100 */ |
100 */ |
101 } |
101 } |
102 |
102 |
103 if(BlockResult()==EPass) |
103 if(BlockResult()==EPass) |
104 { |
104 { |
105 SetBlockResult(TestTimer()); |
105 SetBlockResult(TestTimerL()); |
106 } |
106 } |
107 |
107 |
108 //run this no matter if its failed or not..., just to get some statistics out. |
108 //run this no matter if its failed or not..., just to get some statistics out. |
109 |
109 |
110 //temporarily tagged out this test as it is causing a test timeout |
110 //temporarily tagged out this test as it is causing a test timeout |
111 //can be reinstated as soon as the device driver has been fully implemented |
111 //can be reinstated as soon as the device driver has been fully implemented |
112 |
112 |
113 //SanityTestTimedUtrace(); |
113 //SanityTestTimedUtraceL(); |
114 |
114 |
115 |
115 |
116 return ETrue; |
116 return ETrue; |
117 } |
117 } |
118 |
118 |
119 |
119 |
120 TVerdict CPerformanceSanityWrapper::TestTimer() |
120 TVerdict CPerformanceSanityWrapper::TestTimerL() |
121 { |
121 { |
122 INFO_PRINTF1(_L("Testing User side timer functions")); |
122 INFO_PRINTF1(_L("Testing User side timer functions")); |
123 TBool passed = EFalse; |
123 TBool passed = EFalse; |
124 TInt error = KErrNone; |
124 TInt error = KErrNone; |
125 |
125 |
126 INFO_PRINTF1(_L("Testing User side timer functions #1")); |
126 INFO_PRINTF1(_L("Testing User side timer functions #1")); |
127 |
127 |
128 //test CUptTimer class |
128 //test CUptTimer class |
129 TTestTimer timer; |
129 TTestTimer timer; |
130 TUint32 userTime = 0; |
130 TUint32 userTime = 0; |
131 passed = timer.TestUserTimer(userTime); |
131 passed = timer.TestUserTimerL(userTime); |
132 |
132 |
133 INFO_PRINTF1(_L("Testing User side timer functions #2")); |
133 INFO_PRINTF1(_L("Testing User side timer functions #2")); |
134 if(!passed) |
134 if(!passed) |
135 { |
135 { |
136 SetBlockResult(EFail); |
136 SetBlockResult(EFail); |
184 } |
184 } |
185 |
185 |
186 return BlockResult(); |
186 return BlockResult(); |
187 } |
187 } |
188 |
188 |
189 TBool CPerformanceSanityWrapper::SanityTestTimedUtrace() |
189 TBool CPerformanceSanityWrapper::SanityTestTimedUtraceL() |
190 { |
190 { |
191 TTestTimer timer; |
191 TTestTimer timer; |
192 TUint32 userSanityTime = 0; |
192 TUint32 userSanityTime = 0; |
193 TUint32 userSanityLongTime = 0; |
193 TUint32 userSanityLongTime = 0; |
194 TUint32 userUtraceTime = 0; |
194 TUint32 userUtraceTime = 0; |
195 |
195 |
196 timer.TestUserTimer(userSanityTime); |
196 timer.TestUserTimerL(userSanityTime); |
197 timer.TestUserLongTimer(userSanityLongTime); |
197 timer.TestUserLongTimerL(userSanityLongTime); |
198 timer.TestUTraceUserTimer(userUtraceTime); |
198 timer.TestUTraceUserTimerL(userUtraceTime); |
199 |
199 |
200 TUint32 kernelSanityTime = 0; |
200 TUint32 kernelSanityTime = 0; |
201 // TUint32 kernelSanityLongTime = 0; |
201 // TUint32 kernelSanityLongTime = 0; |
202 TUint32 kernelUTraceTime = 0; |
202 TUint32 kernelUTraceTime = 0; |
203 |
203 |
224 |
224 |
225 //Test for variation between the different foos |
225 //Test for variation between the different foos |
226 //I want to find out what the variation is, is it static 0.5us, or is it 10% variable, or what? |
226 //I want to find out what the variation is, is it static 0.5us, or is it 10% variable, or what? |
227 for(TInt i = 0; i < iters; i++) |
227 for(TInt i = 0; i < iters; i++) |
228 { |
228 { |
229 timer.TestUserTimer(user[i]); |
229 timer.TestUserTimerL(user[i]); |
230 timer.TestUserLongTimer(ulong[i]); |
230 timer.TestUserLongTimerL(ulong[i]); |
231 utracedriver.SanityTestTimer(kernel[i]); |
231 utracedriver.SanityTestTimer(kernel[i]); |
232 //utracedriver.SanityTestLongTimer(klong[i]); |
232 //utracedriver.SanityTestLongTimer(klong[i]); |
233 } |
233 } |
234 |
234 |
235 } |
235 } |