|
1 // Copyright (c) 2008-2009 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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent - Internal Symbian test code |
|
20 */ |
|
21 |
|
22 #ifndef __TPROFILER_H__ |
|
23 #define __TPROFILER_H__ |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <test/tefexportconst.h> |
|
27 |
|
28 class CTestStep; |
|
29 |
|
30 |
|
31 class CTProfiler : public CBase |
|
32 { |
|
33 public: |
|
34 IMPORT_C static CTProfiler* NewL(CTestStep& aTestStep); |
|
35 IMPORT_C ~CTProfiler(); |
|
36 IMPORT_C void StartTimer(); |
|
37 IMPORT_C TInt64 StopTimer(); |
|
38 IMPORT_C void InitResults(); |
|
39 IMPORT_C void MarkResultSetL(); |
|
40 IMPORT_C TUint32 GetTrimedMean(); |
|
41 IMPORT_C TUint32 Mean(); |
|
42 IMPORT_C TInt PercentageChange(TInt aFirstTime, TInt aSecondTime); |
|
43 IMPORT_C void ResultsAnalysis(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters); |
|
44 IMPORT_C void ResultsAnalysisPixelRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixels); |
|
45 IMPORT_C void ResultsAnalysisCharacterRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixels); |
|
46 IMPORT_C void ResultsAnalysisAverageByIterations(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters); |
|
47 IMPORT_C void ResultsAnalysisAverageByNumberOfIterations(const TDesC& aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters); |
|
48 IMPORT_C void ResultsAnalysisFrameRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixels); |
|
49 IMPORT_C void ResultsAnalysisScreenRotationRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixels); |
|
50 IMPORT_C void ResultsAnalysisZorderSwitchingRate(const TDesC & aTestName, TInt aZorderSwitching, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixels); |
|
51 IMPORT_C void FreeResultsMemory(); |
|
52 |
|
53 private: |
|
54 CTProfiler(CTestStep& aTestStep); |
|
55 void ConstructL(); |
|
56 TUint32 TimeMax(); |
|
57 TUint32 TimeMin(); |
|
58 private: |
|
59 TUint32 iStart; |
|
60 TUint32 iEnd; |
|
61 TUint32 iDiff; |
|
62 TInt iFreq; |
|
63 RArray<TUint32> iResults; |
|
64 TBool iResultsInitalised; |
|
65 CTestStep& iTestStep; |
|
66 }; |
|
67 |
|
68 #endif |
|
69 |
|
70 |