graphicstest/graphicstestharness/src/tprofiler.cpp
changeset 194 18f84489a694
parent 152 9f1c3fea0f87
equal deleted inserted replaced
183:6a1564a2f3e6 194:18f84489a694
   105     {
   105     {
   106     PROFILER_TEST(!iResultsInitalised);
   106     PROFILER_TEST(!iResultsInitalised);
   107     iResultsInitalised = ETrue;
   107     iResultsInitalised = ETrue;
   108     iDiff = 0;
   108     iDiff = 0;
   109     iResults.Reset();
   109     iResults.Reset();
       
   110     iResultsTimingOrder.Reset();
   110     iSessionId = Math::Random();
   111     iSessionId = Math::Random();
   111     if (iSessionId < 1000000)
   112     if (iSessionId < 1000000)
   112         {
   113         {
   113         /*
   114         /*
   114          * The reason for bumping up low session id values is that it allows
   115          * The reason for bumping up low session id values is that it allows
   202     {
   203     {
   203     if (iResults.Count() == 0)
   204     if (iResults.Count() == 0)
   204         {
   205         {
   205         return 0;
   206         return 0;
   206         }
   207         }
   207     TUint32 result = iResults[0];
   208     return iResults[iResults.Count()-1];
   208     for(TInt i = 0; i < iResults.Count(); i++)
       
   209         {
       
   210         if(iResults[i] > result)
       
   211             result = iResults[i];
       
   212         }
       
   213     return result;
       
   214     }
   209     }
   215 
   210 
   216 /**
   211 /**
   217 Finds the minimum time taken
   212 Finds the minimum time taken
   218 */  
   213 */  
   220     {
   215     {
   221     if (iResults.Count() == 0)
   216     if (iResults.Count() == 0)
   222         {
   217         {
   223         return 0;
   218         return 0;
   224         }
   219         }
   225     TUint32 result = iResults[0];
   220     return iResults[0];
   226     for(TInt i = 0; i < iResults.Count(); i++)
       
   227         {
       
   228         if(iResults[i] < result)
       
   229             result = iResults[i];
       
   230         }
       
   231     return result;
       
   232     }
   221     }
   233 
   222 
   234 /**
   223 /**
   235 Reports analysis results
   224 Reports analysis results
   236 
   225