graphicstest/graphicstestharness/src/tprofiler.cpp
changeset 187 9f66f99ee56f
parent 69 3365349494cc
child 136 62bb7c97884c
--- a/graphicstest/graphicstestharness/src/tprofiler.cpp	Tue Jun 22 15:21:29 2010 +0300
+++ b/graphicstest/graphicstestharness/src/tprofiler.cpp	Fri Sep 24 16:14:28 2010 +0300
@@ -555,3 +555,27 @@
     {
     iStoreResultInTimingOrder = aStoreResultInTimingOrder;
     }
+
+/**
+Reports analysis results for glyph rates
+
+@param aTestName is the name of the test case
+@param aRotation is the screen rotation being used in the test
+@param aSrcScreenMode is the source screen mode being used, 
+i.e. for bitmap display conversion the source and destinations bitmaps maybe different
+@param aDstScreenMode is the destination screen mode (usually the display screen mode)
+@param aIters is the number of iterations used in the test
+@param aNumGlyphs is the number of glyphs used per iteration
+*/
+
+EXPORT_C void CTProfiler::ResultsAnalysisGlyphRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumGlyphsPerIteration)
+    {
+    PROFILER_TEST(iResultsInitalised);
+
+    TReal time = (iResults.Count() > 0) ? (TReal)iResults[0] / 1000000 : 0;
+    TInt32 glyphRate = aNumGlyphsPerIteration*aIters/time;
+    PROFILER_INFO_PRINTF7(_L("TID:   %S  Rot:    %i  SrcMode:    %i  DestMode:   %i  Iters: %i   TrimmedMean:    %i  glyphs/second"), &aTestName, aRotation, aSrcScreenMode, aDstScreenMode, aIters, glyphRate);
+    PROFILER_INFO_PRINTF3(_L("Max:   %i  Min:    %i  "), TimeMax(), TimeMin());
+    iResultsInitalised = EFalse;
+  }
+