1 // Copyright (c) 2005-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 #ifndef __TE_PERFTESTSTEP_H__ |
|
17 #define __TE_PERFTESTSTEP_H__ |
|
18 |
|
19 #include <e32std.h> |
|
20 #include <test/testexecutestepbase.h> |
|
21 |
|
22 class TRepStatistics |
|
23 { |
|
24 public: |
|
25 #ifdef __WINS__ |
|
26 #ifdef _DEBUG |
|
27 enum { KTicks2LoadFromCache = 70 }; // emulator UDEB |
|
28 #else |
|
29 enum { KTicks2LoadFromCache = 40 }; // emulator UREL |
|
30 #endif |
|
31 #else |
|
32 #ifdef _DEBUG |
|
33 enum { KTicks2LoadFromCache = 90 }; // armv5 UDEB |
|
34 #else |
|
35 enum { KTicks2LoadFromCache = 60 }; // armv5 UREL |
|
36 #endif |
|
37 #endif |
|
38 |
|
39 inline TRepStatistics(); |
|
40 inline TRepStatistics(const TRepStatistics& aRepStatistics); |
|
41 inline TRepStatistics(TUint32 aRepUid, TUint32 aLoadTicks); |
|
42 inline TBool MatchUid(TUint32 aRepUid) const; |
|
43 void AddData(TUint32 aElapsedTicks); |
|
44 |
|
45 TUint32 iRepUid; |
|
46 TUint iUseCount; // how many times the rep is open |
|
47 TUint32 iSumLoadTicks; |
|
48 TUint iCacheMisses; // how many times rep need to be reloaded |
|
49 }; |
|
50 |
|
51 //----------------------------------------------- |
|
52 |
|
53 class TIpcStatistics |
|
54 { |
|
55 public: |
|
56 inline TIpcStatistics(); |
|
57 void AddData(TUint32 aElapsedTicks); |
|
58 |
|
59 TUint iUseCount; |
|
60 TUint32 iSumElapsedTicks; |
|
61 }; |
|
62 |
|
63 //----------------------------------------------- |
|
64 |
|
65 _LIT(KGetPerfTestResults, "GetPerfTestResults"); |
|
66 _LIT(KIniTestMode, "TestMode"); |
|
67 _LIT(KResultsSection, "Output"); |
|
68 |
|
69 class CPerfTestStep : public CTestStep |
|
70 { |
|
71 public: |
|
72 enum TTestModes |
|
73 { |
|
74 ETiming, |
|
75 EBoot |
|
76 }; |
|
77 |
|
78 inline CPerfTestStep(){SetTestStepName(KGetPerfTestResults);}; |
|
79 virtual TVerdict doTestStepL(void); |
|
80 |
|
81 private: |
|
82 void ConvertTickToSecAndMilli(TUint32 aTick, TUint& aSec, TUint& aMilliSec); |
|
83 |
|
84 private: |
|
85 TInt iTickFreq; |
|
86 }; |
|
87 |
|
88 #include "TE_PerfTestStep.inl" |
|
89 |
|
90 #endif |
|