|
1 // Copyright (c) 2007-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 // UTrace Performance Tests Kernel-Side Timer. |
|
15 // |
|
16 |
|
17 |
|
18 |
|
19 /** |
|
20 @file te_perfsanitytimer.h |
|
21 @internalTechnology |
|
22 @prototype |
|
23 */ |
|
24 #ifndef TE_UPTSANITYTIMER_H_ |
|
25 #define TE_UPTSANITYTIMER_H_ |
|
26 |
|
27 #ifndef __KERNEL_MODE__ |
|
28 #include "timer/te_perfusertimer.h" |
|
29 #else |
|
30 #include "timer/te_perfkerneltimer.h" |
|
31 #endif |
|
32 #include "te_perfsanityhelpers.h" |
|
33 |
|
34 class TTestTimer |
|
35 { |
|
36 private: |
|
37 enum TTestMethodType |
|
38 { |
|
39 ESanityFoo, |
|
40 ESanityFooLong, |
|
41 EUtraceUsr, |
|
42 EUtraceKrn, |
|
43 }; |
|
44 |
|
45 public: |
|
46 TBool TestUserTimer(TUint32& aTestTime); |
|
47 TBool TestUserLongTimer(TUint32& aTestTime); |
|
48 TBool TestKernelTimer(TUint32& aTestTime); |
|
49 TBool TestKernelLongTimer(TUint32& aTestTime); |
|
50 TBool TestUTraceUserTimer(TUint32& aTestTime); |
|
51 TBool TestUTraceKernelTimer(TUint32& aTestTime); |
|
52 TUint32 Count(){return iCount;} |
|
53 private: |
|
54 TBool VerifyTime(TUint32 aTime); |
|
55 TBool DoTestUTraceTimer(const TInt aApi, TUint32& aTestTime); |
|
56 TBool DoTestTrace(const TTestMethodType aMethod, TUint32& aTestTime); |
|
57 private: |
|
58 #ifndef __KERNEL_MODE__ |
|
59 CUptTimer iTimer; |
|
60 #else |
|
61 TKernelTimer iTimer; |
|
62 #endif |
|
63 /** |
|
64 * In case you want the latest count... |
|
65 */ |
|
66 TUint32 iCount; |
|
67 }; |
|
68 |
|
69 #endif /*TE_UPTSANITYTIMER_H_*/ |
|
70 |
|
71 |