First public contribution.
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 @internalComponent - Internal Symbian test code
22 #include <test/TestExecuteStepBase.h>
25 #include "tprofiler.h"
28 #define PROFILER_TEST(a) (iTestStep.testBooleanTrue((a), (TText8*)__FILE__, __LINE__))
31 #define PROFILER_INFO_PRINTF1(p1) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1))
32 #define PROFILER_INFO_PRINTF2(p1, p2) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2))
33 #define PROFILER_INFO_PRINTF3(p1, p2, p3) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3))
34 #define PROFILER_INFO_PRINTF4(p1, p2, p3, p4) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3), (p4))
35 #define PROFILER_INFO_PRINTF5(p1, p2, p3, p4, p5) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3), (p4), (p5))
36 #define PROFILER_INFO_PRINTF6(p1, p2, p3, p4, p5, p6) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3), (p4), (p5), (p6))
37 #define PROFILER_INFO_PRINTF7(p1, p2, p3, p4, p5, p6, p7) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7))
39 #define PROFILER_WARN_PRINTF1(p1) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1))
40 #define PROFILER_WARN_PRINTF2(p1, p2) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2))
41 #define PROFILER_WARN_PRINTF3(p1, p2, p3) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2), (p3))
42 #define PROFILER_WARN_PRINTF4(p1, p2, p3, p4) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2), (p3), (p4))
43 #define PROFILER_WARN_PRINTF5(p1, p2, p3, p4, p5) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2), (p3), (p4), (p5))
44 #define PROFILER_WARN_PRINTF6(p1, p2, p3, p4, p5, p6) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2), (p3), (p4), (p5), (p6))
45 #define PROFILER_WARN_PRINTF7(p1, p2, p3, p4, p5, p6, p7) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2), (p3), (p4), (p5), (p6), (p7))
47 #define PROFILER_ERR_PRINTF1(p1) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1))
48 #define PROFILER_ERR_PRINTF2(p1, p2) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2))
49 #define PROFILER_ERR_PRINTF3(p1, p2, p3) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2), (p3)) ;
50 #define PROFILER_ERR_PRINTF4(p1, p2, p3, p4) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2), (p3), (p4))
51 #define PROFILER_ERR_PRINTF5(p1, p2, p3, p4, p5) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2), (p3), (p4), (p5))
52 #define PROFILER_ERR_PRINTF6(p1, p2, p3, p4, p5, p6) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2), (p3), (p4), (p5), (p6))
53 #define PROFILER_ERR_PRINTF7(p1, p2, p3, p4, p5, p6, p7) iTestStep.Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2), (p3), (p4), (p5), (p6), (p7))
56 CTProfiler::CTProfiler(CTestStep& aTestStep) :
61 EXPORT_C CTProfiler::~CTProfiler()
64 iResultsTimingOrder.Reset();
67 EXPORT_C CTProfiler* CTProfiler::NewL(CTestStep& aTestStep)
69 CTProfiler* profiler = new (ELeave) CTProfiler(aTestStep);
70 CleanupStack::PushL(profiler);
71 profiler->ConstructL();
76 void CTProfiler::ConstructL()
78 User::LeaveIfError((HAL::Get(HALData::EFastCounterFrequency, iFreq)));
79 PROFILER_INFO_PRINTF2(_L("FastCounterFrequency: %i Hz"), iFreq);
83 User::Leave(KErrDivideByZero);
87 EXPORT_C void CTProfiler::StartTimer()
89 iStart = User::FastCounter();
92 EXPORT_C TInt64 CTProfiler::StopTimer()
94 iEnd = User::FastCounter();
95 // wrap around automatically dealt with by two's complement arithmetic as long as all variables are unsigned int
96 iDiff += iEnd - iStart;
97 TInt64 difftime = (1000000*(TInt64)iDiff) / (TInt64)iFreq;
102 Initalises the results. Must be called before MarkResultSet
104 EXPORT_C void CTProfiler::InitResults()
106 PROFILER_TEST(!iResultsInitalised);
107 iResultsInitalised = ETrue;
110 iSessionId = Math::Random();
111 if (iSessionId < 1000000)
114 * The reason for bumping up low session id values is that it allows
115 * us to in the future to re-compact the session ids into a unique
116 * number range from zero to one million. Duplicate session id values
117 * generated on the same day can cause confusion but will be very rare.
119 iSessionId += 1000000;
123 * The build system needs to know the session id because it maps it to
124 * the job ID it is running, so it can map test results to a particular
127 PROFILER_INFO_PRINTF2(_L("SQL_SESSION_ID=%u"), iSessionId);
132 Records set current time. Can be called multiple times so an average can be taken.
134 EXPORT_C void CTProfiler::MarkResultSetL()
136 MarkResultSetAndSuspendL();
141 Records set current time. Unlike MarkResultSetL() the function doesn't
142 restart the timer at the end. The following operations will not be
143 included into benchmark mesuarment. To resume the profiling the user must
146 @see MarkResultSetL()
147 Can be called multiple times so an average can be taken.
149 EXPORT_C void CTProfiler::MarkResultSetAndSuspendL()
151 TUint32 res = StopTimer();
152 iResults.InsertInUnsignedKeyOrderAllowRepeatsL(res);
153 if(iStoreResultInTimingOrder)
155 iResultsTimingOrder.AppendL(res);
158 PROFILER_TEST(iResultsInitalised);
162 Frees all memory allocated by results capturing methods like MarkResultSetL().
164 EXPORT_C void CTProfiler::FreeResultsMemory()
167 iResultsTimingOrder.Reset();
171 Returns the trimmed mean of a set of results. i.e. Trims off the 20% smallest and the 20% largest of the data results.
173 EXPORT_C TUint32 CTProfiler::GetTrimedMean()
176 if (iResults.Count() <= 50)
178 PROFILER_WARN_PRINTF2(_L("Not enough results for trimming - need more than 50, but got %d"), iResults.Count());
180 if (iResults.Count() == 0) // If iResults is zero then do nothing
185 TInt twentyPercentCount = iResults.Count()/5;
186 for (TInt count = twentyPercentCount; count < iResults.Count()-twentyPercentCount; count++)
188 total += iResults[count];
190 return ((TUint32)(total/(iResults.Count()-(twentyPercentCount*2))));
193 EXPORT_C TInt CTProfiler::PercentageChange(TInt aFirstTime, TInt aSecondTime)
195 return ((aFirstTime - aSecondTime)*100) / aFirstTime;
199 Finds the maximum time taken
201 EXPORT_C TUint32 CTProfiler::TimeMax()
203 if (iResults.Count() == 0)
207 TUint32 result = iResults[0];
208 for(TInt i = 0; i < iResults.Count(); i++)
210 if(iResults[i] > result)
211 result = iResults[i];
217 Finds the minimum time taken
219 EXPORT_C TUint32 CTProfiler::TimeMin()
221 if (iResults.Count() == 0)
225 TUint32 result = iResults[0];
226 for(TInt i = 0; i < iResults.Count(); i++)
228 if(iResults[i] < result)
229 result = iResults[i];
235 Reports analysis results
237 @param aTestName is the name of the test case
238 @param aRotation is the screen rotation being used in the test
239 @param aSrcScreenMode is the source screen mode being used,
240 i.e. for bitmap display conversion the source and destinations bitmaps maybe different
241 @param aDstScreenMode is the destination screen mode (usually the display screen mode)
242 @param aIters is the number of iterations used in the test
244 EXPORT_C void CTProfiler::ResultsAnalysis(const TDesC& aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters)
246 PROFILER_TEST(iResultsInitalised);
248 variation.Format(KVariation, aRotation, aSrcScreenMode, aDstScreenMode,aIters);
249 TBuf<128> variationMax;
250 variationMax.Format(KMaxTime, &variation);
251 TBuf<128> variationMin;
252 variationMin.Format(KMinTime, &variation);
253 TBuf<128> variationTrimmedMean;
254 variationTrimmedMean.Format(KTrimmedMean, &variation);
256 SqlInsert(&aTestName, &variationTrimmedMean, &KMicroSeconds, GetTrimedMean());
257 SqlInsert(&aTestName, &variationMax, &KMicroSeconds, TimeMax());
258 SqlInsert(&aTestName, &variationMin, &KMicroSeconds, TimeMin());
260 iResultsInitalised = EFalse;
264 Reports analysis results for pixel rates
266 @param aTestName is the name of the test case
267 @param aRotation is the screen rotation being used in the test
268 @param aSrcScreenMode is the source screen mode being used,
269 i.e. for bitmap display conversion the source and destinations bitmaps maybe different
270 @param aDstScreenMode is the destination screen mode (usually the display screen mode)
271 @param aIters is the number of iterations used in the test
272 @param aNumPixels is the number of pixels rendered
274 EXPORT_C void CTProfiler::ResultsAnalysisPixelRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixelsPerIteration)
276 PROFILER_TEST(iResultsInitalised);
278 TReal time = (TReal)iResults[0] / 1000000;
279 TInt32 pixelRate = aNumPixelsPerIteration * aIters / time;
282 variation.Format(KVariationPPI, aRotation, aSrcScreenMode, aDstScreenMode, aIters, aNumPixelsPerIteration);
283 TBuf<128> variationMax;
284 variationMax.Format(KMaxTime, &variation);
285 TBuf<128> variationMin;
286 variationMin.Format(KMinTime, &variation);
288 SqlInsert(&aTestName, &variation, &KPixelsPerSecond, pixelRate);
289 SqlInsert(&aTestName, &variationMax, &KMicroSeconds, TimeMax());
290 SqlInsert(&aTestName, &variationMin, &KMicroSeconds, TimeMin());
292 iResultsInitalised = EFalse;
296 Reports analysis results for character rates
298 @param aTestName is the name of the test case
299 @param aRotation is the screen rotation being used in the test
300 @param aSrcScreenMode is the source screen mode being used,
301 i.e. for bitmap display conversion the source and destinations bitmaps maybe different
302 @param aDstScreenMode is the destination screen mode (usually the display screen mode)
303 @param aIters is the number of iterations used in the test
304 @param aNumChars is the number of characters rendered
306 EXPORT_C void CTProfiler::ResultsAnalysisCharacterRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumCharsPerIteration)
308 PROFILER_TEST(iResultsInitalised);
309 TReal time = (TReal)iResults[0] / 1000000;
310 TInt32 characterRate = aNumCharsPerIteration*aIters/time;
313 variation.Format(KVariationCPI, aRotation, aSrcScreenMode, aDstScreenMode, aIters, aNumCharsPerIteration);
314 TBuf<128> variationMax;
315 variationMax.Format(KMaxTime, &variation);
316 TBuf<128> variationMin;
317 variationMin.Format(KMinTime, &variation);
319 SqlInsert(&aTestName, &variation, &KCharacterRate, characterRate);
320 SqlInsert(&aTestName, &variationMax, &KMicroSeconds, TimeMax());
321 SqlInsert(&aTestName, &variationMin, &KMicroSeconds, TimeMin());
323 iResultsInitalised = EFalse;
327 Reports analysis results when there is one total result given the number of itertions
328 This function should only be used if you cannot obtain the times for each iteration of
329 the test and ResultsAnalysis cannot be used.
331 @param aTestName is the name of the test case
332 @param aRotation is the screen rotation being used in the test
333 @param aSrcScreenMode is the source screen mode being used,
334 i.e. for bitmap display conversion the source and destinations bitmaps maybe different
335 @param aDstScreenMode is the destination screen mode (usually the display screen mode)
336 @param aIters is the number of iterations used in the test
338 EXPORT_C void CTProfiler::ResultsAnalysisAverageByIterations(const TDesC& aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters)
340 PROFILER_TEST(iResultsInitalised);
342 TUint32 result = iResults[0]/aIters;
345 variation.Format(KVariation, aRotation, aSrcScreenMode, aDstScreenMode,aIters);
346 TBuf<128> variationMax;
347 variationMax.Format(KMaxTime, &variation);
348 TBuf<128> variationMin;
349 variationMin.Format(KMinTime, &variation);
351 SqlInsert(&aTestName, &variation, &KMicroSeconds, result);
352 SqlInsert(&aTestName, &variationMax, &KMicroSeconds, TimeMax());
353 SqlInsert(&aTestName, &variationMin, &KMicroSeconds, TimeMin());
355 iResultsInitalised = EFalse;
359 * Generate an SQL insert statement into the logs, intended for subsequent
360 * extraction by a script to load into the database.
361 * Inserts data fields for
362 * (sessionid, testname, testattribute, testunits, testresultvalue).
363 * An example insertion:
365 * SQL_UPLOAD_VERSION_0:insert into performance.testresultstable (sessionid, testname, testattribute, testunits, testresultvalue) values
366 * SQL_UPLOAD_VERSION_0:('1136416860', 'GRAPHICS-UI-BENCH-S60-0009', 'Rot_0_SrcMode_0_DestMode_0_Iters_25', 'pixels/second', '394159');
369 * @param aTestName Column testname
370 * @param aTestAttribute Column testattribute
371 * @param aTestUnit Column testunits
372 * @param aTestResultValue Column testresultvalue
374 EXPORT_C void CTProfiler::SqlInsert(const TDesC* aTestName, const TDesC* aTestAttribute, const TDesC* aTestUnit, TInt32 aTestResultValue)
378 * There is a 256 character limit on logging output, and a 7 vararg limit
379 * on the macro we can use to issue printfs to the test framework. Each
380 * output line which has SQL in it needs to have a marker at the front so
381 * that a script can reliably extract the SQL statements. Hence we use
382 * the following incremental strategy of getting our SQL statements output
385 scratchPad.Format(KSqlInsert);
386 PROFILER_INFO_PRINTF2(_L("%S"), &scratchPad);
387 scratchPad.Format(KSqlData, iSessionId, aTestName, aTestAttribute, aTestUnit, aTestResultValue);
388 PROFILER_INFO_PRINTF2(_L("%S"), &scratchPad);
392 Reports analysis results for frame rates
394 @param aTestName is the name of the test case
395 @param aRotation is the screen rotation being used in the test
396 @param aSrcScreenMode is the source screen mode being used,
397 i.e. for bitmap display conversion the source and destinations bitmaps maybe different
398 @param aDstScreenMode is the destination screen mode (usually the display screen mode)
399 @param aIters is the number of iterations used in the test
400 @param aNumPixels is the number of pixels rendered
402 EXPORT_C void CTProfiler::ResultsAnalysisFrameRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixelsPerIteration)
404 PROFILER_TEST(iResultsInitalised);
405 TReal time = (TReal)iResults[0] / 1000000;
406 TInt32 pixelRate = aNumPixelsPerIteration * aIters / time;
407 TInt32 frameRate = aIters / time;
410 variation.Format(KVariation, aRotation, aSrcScreenMode, aDstScreenMode, aIters);
411 TBuf<128> variationMax;
412 variationMax.Format(KMaxTime, &variation);
413 TBuf<128> variationMin;
414 variationMin.Format(KMinTime, &variation);
416 SqlInsert(&aTestName, &variation, &KPixelsPerSecond, pixelRate);
417 SqlInsert(&aTestName, &variation, &KFrameRate, frameRate);
418 SqlInsert(&aTestName, &variationMax, &KMicroSeconds, TimeMax());
419 SqlInsert(&aTestName, &variationMin, &KMicroSeconds, TimeMin());
421 iResultsInitalised = EFalse;
425 Reports analysis results for screen rotation rates
427 @param aTestName is the name of the test case
428 @param aRotation is the screen rotation being used in the test
429 @param aSrcScreenMode is the source screen mode being used,
430 i.e. for bitmap display conversion the source and destinations bitmaps maybe different
431 @param aDstScreenMode is the destination screen mode (usually the display screen mode)
432 @param aIters is the number of iterations used in the test
433 @param aNumPixels is the number of pixels rendered
435 EXPORT_C void CTProfiler::ResultsAnalysisScreenRotationRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixelsPerIteration)
437 PROFILER_TEST(iResultsInitalised);
438 TReal time = (TReal)iResults[0] / 1000000;
439 TInt32 pixelRate = aNumPixelsPerIteration * aIters / time;
440 TInt32 frameRate = aIters / time;
443 variation.Format(KVariationPPI, aRotation, aSrcScreenMode, aDstScreenMode, aIters, aNumPixelsPerIteration);
444 TBuf<128> variationMax;
445 variationMax.Format(KMaxTime, &variation);
446 TBuf<128> variationMin;
447 variationMin.Format(KMinTime, &variation);
449 SqlInsert(&aTestName, &variation, &KPixelsPerSecond, pixelRate);
450 SqlInsert(&aTestName, &variation, &KFrameRate, frameRate);
451 SqlInsert(&aTestName, &variationMax, &KMicroSeconds, TimeMax());
452 SqlInsert(&aTestName, &variationMin, &KMicroSeconds, TimeMin());
454 iResultsInitalised = EFalse;
458 Reports analysis results for Z Order Switching rates
460 @param aTestName is the name of the test case
461 @param aZorderSwitching is the z Order Switching being used in the test
462 @param aSrcScreenMode is the source screen mode being used,
463 @param aDstScreenMode is the destination screen mode (usually the display screen mode)
464 @param aIters is the number of iterations used in the test
465 @param aNumPixels is the number of pixels rendered
467 EXPORT_C void CTProfiler::ResultsAnalysisZorderSwitchingRate(const TDesC & aTestName, TInt aZorderSwitching, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixelsPerIteration)
469 PROFILER_TEST(iResultsInitalised);
470 TReal time = (TReal)iResults[0] / 1000000;
471 TInt32 pixelRate = aNumPixelsPerIteration * aIters / time;
472 TInt32 frameRate = aIters / time;
475 variation.Format(KVariationZOrder, aZorderSwitching, aSrcScreenMode, aDstScreenMode, aIters, aNumPixelsPerIteration);
476 TBuf<128> variationMax;
477 variationMax.Format(KMaxTime, &variation);
478 TBuf<128> variationMin;
479 variationMin.Format(KMinTime, &variation);
481 SqlInsert(&aTestName, &variation, &KPixelsPerSecond, pixelRate);
482 SqlInsert(&aTestName, &variation, &KFrameRate, frameRate);
483 SqlInsert(&aTestName, &variationMax, &KMicroSeconds, TimeMax());
484 SqlInsert(&aTestName, &variationMin, &KMicroSeconds, TimeMin());
486 iResultsInitalised = EFalse;
490 This function calclulates the mean without deleting any of the values from iResults
492 EXPORT_C TUint32 CTProfiler::Mean()
495 TInt count1 = iResults.Count();
496 for (TInt count = 0; count < iResults.Count(); count++)
498 total += iResults[count];
500 return ((TUint32)(total/(iResults.Count())));
505 Reports analysis of results when there are more then one values by calculating the average based on value of iResult.count().
507 @param aTestName is the name of the test case
508 @param aRotation is the screen rotation being used in the test
509 @param aSrcScreenMode is the source screen mode being used,
510 i.e. for bitmap display conversion the source and destinations bitmaps maybe different
511 @param aDstScreenMode is the destination screen mode (usually the display screen mode)
512 @param aIters is the number of iterations used in the test
514 EXPORT_C void CTProfiler::ResultsAnalysisAverageByNumberOfIterations(const TDesC& aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode,TInt aIters)
516 PROFILER_TEST(iResultsInitalised);
518 variation.Format(KVariation, aRotation, aSrcScreenMode, aDstScreenMode, aIters);
519 TBuf<128> variationMean;
520 variationMean.Format(KMean, &variation);
521 TBuf<128> variationMax;
522 variationMax.Format(KMaxTime, &variation);
523 TBuf<128> variationMin;
524 variationMin.Format(KMinTime, &variation);
526 SqlInsert(&aTestName, &variationMean, &KMicroSeconds, Mean());
527 SqlInsert(&aTestName, &variationMax, &KMicroSeconds, TimeMax());
528 SqlInsert(&aTestName, &variationMin, &KMicroSeconds, TimeMin());
530 iResultsInitalised = EFalse;
536 EXPORT_C void CTProfiler::ShowResultArrayInTimingOrder()
538 for(TInt i=0; i < iResultsTimingOrder.Count(); i++)
540 PROFILER_INFO_PRINTF3(_L("iResultsTimingOrder[%4d]: %8d"),i, iResultsTimingOrder[i]);
545 @param aStoreResultInTimingOrder Signify whether the results should be stored as they coming
547 EXPORT_C void CTProfiler::SetStoreResultInTimingOrder(TBool aStoreResultInTimingOrder)
549 iStoreResultInTimingOrder = aStoreResultInTimingOrder;
553 Reports analysis results for glyph rates
555 @param aTestName is the name of the test case
556 @param aRotation is the screen rotation being used in the test
557 @param aSrcScreenMode is the source screen mode being used,
558 i.e. for bitmap display conversion the source and destinations bitmaps maybe different
559 @param aDstScreenMode is the destination screen mode (usually the display screen mode)
560 @param aIters is the number of iterations used in the test
561 @param aNumGlyphs is the number of glyphs used per iteration
564 EXPORT_C void CTProfiler::ResultsAnalysisGlyphRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumGlyphsPerIteration)
566 PROFILER_TEST(iResultsInitalised);
567 TReal time = (iResults.Count() > 0) ? (TReal)iResults[0] / 1000000 : 0;
568 TInt32 glyphRate = aNumGlyphsPerIteration*aIters/time;
571 variation.Format(KVariationCPI, aRotation, aSrcScreenMode, aDstScreenMode, aIters, aNumGlyphsPerIteration);
572 TBuf<128> variationMax;
573 variationMax.Format(KMaxTime, &variation);
574 TBuf<128> variationMin;
575 variationMin.Format(KMinTime, &variation);
577 SqlInsert(&aTestName, &variation, &KGlyphRate, glyphRate);
578 SqlInsert(&aTestName, &variationMax, &KMicroSeconds, TimeMax());
579 SqlInsert(&aTestName, &variationMin, &KMicroSeconds, TimeMin());
581 iResultsInitalised = EFalse;