Home
last modified time | relevance | path

Searched refs:timeBase (Results 1 – 9 of 9) sorted by relevance

/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/power/stats/
H A DBatteryStatsTimerTest.java45 super(clock, type, timeBase, in); in TestTimer()
49 super(clock, type, timeBase); in TestTimer()
93 TimeBase timeBase = new TimeBase(); in testRunning() local
114 TimeBase timeBase = new TimeBase(); in testParceling() local
159 TimeBase timeBase = new TimeBase(); in testResetNoDetach() local
182 TimeBase timeBase = new TimeBase(); in testResetDetach() local
205 TimeBase timeBase = new TimeBase(); in testSummaryParceling() local
206 timeBase.setRunning(true, 10, 20); in testSummaryParceling()
249 timeBase.setRunning(true, 10, 20); in testGetTotalTimeLocked()
274 timeBase.setRunning(true, 10, 20); in testGetCountLocked()
[all …]
H A DBatteryStatsCounterTest.java35 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCounter()
40 timeBase.setRunning(false, 1, 1); in testCounter()
49 timeBase.setRunning(true, 2, 2); in testCounter()
57 timeBase.setRunning(false, 3, 3); in testCounter()
64 timeBase.setRunning(true, 4, 4); in testCounter()
80 timeBase.setRunning(true, 1, 1); in testParceling()
97 timeBase.setRunning(false, 3, 3); in testParceling()
102 timeBase.setRunning(true, 4, 4); in testParceling()
112 new BatteryStatsImpl.Counter(timeBase, fullParcel); in testParceling()
119 timeBase.setRunning(false, 5, 5); in testParceling()
[all …]
H A DBatteryStatsDurationTimerTest.java39 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testStartStop()
42 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase); in testStartStop()
111 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testReset()
114 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase); in testReset()
129 assertEquals(true, timeBase.hasObserver(timer)); in testReset()
147 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testResetAndDetach()
150 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase); in testResetAndDetach()
166 assertEquals(false, timeBase.hasObserver(timer)); in testResetAndDetach()
174 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testParceling()
177 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase); in testParceling()
[all …]
H A DBatteryStatsDualTimerTest.java35 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testResetDetach() local
36 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testResetDetach()
41 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase, subTimeBase); in testResetDetach()
43 assertTrue(timeBase.hasObserver(timer)); in testResetDetach()
45 assertFalse(timeBase.hasObserver(timer.getSubTimer())); in testResetDetach()
52 assertTrue(timeBase.hasObserver(timer)); in testResetDetach()
59 assertFalse(timeBase.hasObserver(timer)); in testResetDetach()
60 assertFalse(timeBase.hasObserver(timer.getSubTimer())); in testResetDetach()
H A DBatteryStatsSamplingTimerTest.java61 final BatteryStatsImpl.TimeBase timeBase = Mockito.mock(BatteryStatsImpl.TimeBase.class); in testEndSampleAndContinueWhenTimeOrCountDecreases() local
63 timeBase); in testEndSampleAndContinueWhenTimeOrCountDecreases()
111 final BatteryStatsImpl.TimeBase timeBase = Mockito.mock(BatteryStatsImpl.TimeBase.class); in testFirstUpdateIsAbsorbed() local
122 timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testFirstUpdateIsAbsorbed()
153 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testSampleTimerSummaryParceling() local
154 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling()
161 timeBase.setRunning(true, clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling()
181 timeBase.setRunning(false, clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling()
195 timeBase.setRunning(true, clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling()
199 new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testSampleTimerSummaryParceling()
[all …]
H A DBatteryStatsStopwatchTimerTest.java35 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testCount() local
36 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCount()
38 null, BatteryStats.SENSOR, null, timeBase); in testCount()
42 timeBase.setRunning(false, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
63 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCount()
83 timeBase.setRunning(true, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
105 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCount()
124 timeBase.setRunning(false, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
130 timeBase.setRunning(true, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
140 timeBase.setRunning(false, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
H A DBatteryStatsSensorTest.java432 BatteryStatsImpl.TimeBase timeBase = bi.getOnBatteryTimeBase(); in testSensorResetTimes() local
434 timeBase.setRunning(true, clocks.uptime * 1000, clocks.realtime * 1000); in testSensorResetTimes()
442 timeBase.setRunning(false, clocks.uptime * 1000, clocks.realtime * 1000); in testSensorResetTimes()
485 timeBase.setRunning(true, clocks.uptime * 1000, clocks.realtime * 1000); in testSensorResetTimes()
H A DBatteryStatsCpuTimesTest.java1377 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in getPartialTimers() local
1381 mClocks, u, WAKE_TYPE_PARTIAL, null, timeBase); in getPartialTimers()
/aosp14/frameworks/base/services/core/java/com/android/server/power/stats/
H A DBatteryStatsImpl.java949 timeBase); in DisplayBatteryStats()
951 timeBase); in DisplayBatteryStats()
2016 timeBase.add(this); in Counter()
2021 timeBase.add(this); in Counter()
2094 timeBase.add(this); in LongSamplingCounterArray()
2099 timeBase.add(this); in LongSamplingCounterArray()
2226 timeBase.add(this); in TimeMultiStateCounter()
2323 timeBase.add(this); in TimeInFreqMultiStateCounter()
2418 timeBase.add(this); in LongSamplingCounter()
2423 timeBase.add(this); in LongSamplingCounter()
[all …]