Home
last modified time | relevance | path

Searched refs:STATS_SINCE_CHARGED (Results 1 – 17 of 17) sorted by relevance

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsSamplingTimerTest.java41 assertEquals(1, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData()
42 assertEquals(10, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData()
46 assertEquals(1, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData()
47 assertEquals(10, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData()
51 assertEquals(1, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData()
52 assertEquals(10, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData()
67 assertEquals(0, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testEndSampleAndContinueWhenTimeOrCountDecreases()
68 assertEquals(0, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testEndSampleAndContinueWhenTimeOrCountDecreases()
74 assertEquals(0, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testEndSampleAndContinueWhenTimeOrCountDecreases()
75 assertEquals(0, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testEndSampleAndContinueWhenTimeOrCountDecreases()
[all …]
DBatteryStatsStopwatchTimerTest.java45 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount()
47 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount()
49 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount()
51 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount()
56 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount()
64 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount()
67 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount()
73 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount()
76 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount()
87 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount()
[all …]
DBatteryStatsSensorTest.java61 assertEquals(2, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop()
63 clocks.realtime * 1000, BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop()
65 assertEquals(1, sensorBgTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop()
67 clocks.realtime * 1000, BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop()
90 sensorTimer.getTotalTimeLocked(curr, BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery()
91 assertEquals(0, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery()
102 sensorTimer.getTotalTimeLocked(curr, BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery()
103 assertEquals(0, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery()
125 sensorTimer.getTotalTimeLocked(curr, BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOnBattery()
126 assertEquals(1, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOnBattery()
[all …]
DLongSamplingCounterTest.java19 import static android.os.BatteryStats.STATS_SINCE_CHARGED;
118 assertEquals(111, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testAddCountLocked()
121 assertEquals(333, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testAddCountLocked()
126 assertEquals(333, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testAddCountLocked()
130 assertEquals(777, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testAddCountLocked()
133 assertEquals(777, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testAddCountLocked()
143 assertEquals(111, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testUpdate()
146 assertEquals(333, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testUpdate()
151 assertEquals(333, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testUpdate()
154 assertEquals(333, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testUpdate()
[all …]
DBatteryStatsCounterTest.java44 assertEquals(0, counter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCounter()
54 assertEquals(4, counter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCounter()
63 assertEquals(4, counter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCounter()
71 assertEquals(6, counter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCounter()
88 assertEquals(3, origCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling()
102 assertEquals(4, summaryCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling()
109 assertEquals(4, summaryCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling()
116 assertEquals(6, summaryCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling()
130 assertEquals(7, fullParcelCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling()
137 assertEquals(7, fullParcelCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling()
[all …]
DBatteryStatsNoteTest.java19 import static android.os.BatteryStats.STATS_SINCE_CHARGED;
70 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
73 assertEquals(0, bgCntr.getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
80 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
83 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
110 long actualTime = aggregTimer.getTotalTimeLocked(300_000, STATS_SINCE_CHARGED); in testNoteStartWakeLocked()
111 long bgTime = aggregTimer.getSubTimer().getTotalTimeLocked(300_000, STATS_SINCE_CHARGED); in testNoteStartWakeLocked()
158 STATS_SINCE_CHARGED); in testNoteUidProcessStateLocked()
163 elapsedTimeUs, STATS_SINCE_CHARGED); in testNoteUidProcessStateLocked()
168 elapsedTimeUs, STATS_SINCE_CHARGED); in testNoteUidProcessStateLocked()
[all …]
DBatteryStatsImplTest.java18 import static android.os.BatteryStats.STATS_SINCE_CHARGED;
96 assertNull(u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes()
97 assertNull(u.getScreenOffCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes()
109 u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes()
111 assertNull(u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes()
113 assertNull(u.getScreenOffCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes()
140 u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes()
142 assertNull(u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes()
144 assertNull(u.getScreenOffCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes()
172 u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes()
[all …]
DBatteryStatsBackgroundStatsTest.java18 import static android.os.BatteryStats.STATS_SINCE_CHARGED;
50 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
57 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
64 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
72 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
79 assertEquals(106_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
86 assertEquals(114_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
94 assertEquals(227_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
101 assertEquals(227_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
150 assertEquals(150_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testScreenOffBgTimeBase()
[all …]
DBatteryStatsCpuTimesTest.java18 import static android.os.BatteryStats.STATS_SINCE_CHARGED;
233 u.getTimeAtCpuSpeed(cluster, speed, STATS_SINCE_CHARGED)); in testUpdateClusterSpeedTimes()
271 uidTimesUs[i][0], u.getUserCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked()
273 uidTimesUs[i][1], u.getSystemCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked()
304 uidTimesUs[i][0] + deltasUs[i][0], u.getUserCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked()
306 uidTimesUs[i][1] + deltasUs[i][1], u.getSystemCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked()
347 uidTimesUs[i][0], u.getUserCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked_isolatedUid()
349 uidTimesUs[i][1], u.getSystemCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked_isolatedUid()
391 expectedUserTimeUs, u.getUserCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked_isolatedUid()
393 expectedSystemTimeUs, u.getSystemCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked_isolatedUid()
[all …]
DLongSamplingCounterArrayTest.java20 import static android.os.BatteryStats.STATS_SINCE_CHARGED;
137 assertArrayEquals(COUNTS, mCounterArray.getCountsLocked(STATS_SINCE_CHARGED), in testGetCountsLocked()
145 assertArrayEquals(COUNTS, mCounterArray.getCountsLocked(STATS_SINCE_CHARGED), in testGetCountsLocked()
DBatteryStatsTimeBaseTest.java283 tb.computeUptime(666, BatteryStats.STATS_SINCE_CHARGED)); in testComputeUptime()
302 tb.computeRealtime(6666, BatteryStats.STATS_SINCE_CHARGED)); in testComputeRealtime()
DBatteryStatsServTest.java601 Assert.assertEquals(8085, serv.getLaunches(BatteryStats.STATS_SINCE_CHARGED)); in testGetLaunches()
638 serv.getStartTime(20000, BatteryStats.STATS_SINCE_CHARGED)); in testGetStartTimeRunning()
677 serv.getStartTime(20000, BatteryStats.STATS_SINCE_CHARGED)); in testGetStartTimeNotRunning()
713 Assert.assertEquals(4042, serv.getStarts(BatteryStats.STATS_SINCE_CHARGED)); in testGetStarts()
DBatteryStatsTimerTest.java375 timer.getTotalTimeLocked(66, BatteryStats.STATS_SINCE_CHARGED)); in testGetTotalTimeLocked()
414 Assert.assertEquals(10000, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testGetCountLocked()
DBatteryStatsHelperTest.java256 BatteryStats.STATS_SINCE_CHARGED); in testGetProcessForegroundTimeMs_largerActivityTime_returnMinTime()
/frameworks/base/core/java/com/android/internal/os/
DBatteryStatsHelper.java105 private int mStatsType = BatteryStats.STATS_SINCE_CHARGED;
899 BatteryStats.STATS_SINCE_CHARGED); in smearScreenBatterySipper()
981 return timer.getTotalTimeLocked(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in getForegroundActivityTotalTimeUs()
DBatteryStatsImpl.java1156 case STATS_SINCE_CHARGED: in computeUptime()
1168 case STATS_SINCE_CHARGED: in computeRealtime()
1240 out.writeLong(computeUptime(uptime, STATS_SINCE_CHARGED)); in writeSummaryToParcel()
1241 out.writeLong(computeRealtime(realtime, STATS_SINCE_CHARGED)); in writeSummaryToParcel()
1344 } else if (which != STATS_SINCE_CHARGED) { in getCountLocked()
1440 } else if (which != STATS_SINCE_CHARGED) { in getCountsLocked()
1610 } else if (which != STATS_SINCE_CHARGED) { in getCountLocked()
1833 } else if (which != STATS_SINCE_CHARGED) { in getTotalTimeLocked()
1845 } else if (which != STATS_SINCE_CHARGED) { in getCountLocked()
6402 final int which = STATS_SINCE_CHARGED; in getGpsBatteryDrainMaMs()
[all …]
/frameworks/base/core/java/android/os/
DBatteryStats.java194 public static final int STATS_SINCE_CHARGED = 0; field in BatteryStats
3578 which == STATS_SINCE_CHARGED ? getStartCount() : "N/A", in dumpCheckinLocked()
5382 computeBatteryRealtime(rawRealtime, STATS_SINCE_CHARGED))); in dumpLocked()
5389 computeBatteryRealtime(rawRealtime, STATS_SINCE_CHARGED))); in dumpLocked()
5932 numExcessive = which == STATS_SINCE_CHARGED in dumpLocked()
6977 dumpLocked(context, pw, "", STATS_SINCE_CHARGED, reqUid, in dumpLocked()
7068 dumpCheckinLocked(context, pw, STATS_SINCE_CHARGED, -1, in dumpCheckinLocked()
7100 helper.refreshStats(STATS_SINCE_CHARGED, UserHandle.USER_ALL); in dumpProtoLocked()
7112 final int which = STATS_SINCE_CHARGED; in dumpProtoAppsLocked()
7673 final int which = STATS_SINCE_CHARGED; in dumpProtoSystemLocked()