Home
last modified time | relevance | path

Searched refs:STATS_SINCE_CHARGED (Results 1 – 13 of 13) 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.java60 assertEquals(2, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop()
62 clocks.realtime * 1000, BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop()
64 assertEquals(1, sensorBgTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop()
66 clocks.realtime * 1000, BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop()
89 sensorTimer.getTotalTimeLocked(curr, BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery()
90 assertEquals(0, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery()
101 sensorTimer.getTotalTimeLocked(curr, BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery()
102 assertEquals(0, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery()
124 sensorTimer.getTotalTimeLocked(curr, BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOnBattery()
125 assertEquals(1, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOnBattery()
[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 …]
DBatteryStatsBackgroundStatsTest.java18 import static android.os.BatteryStats.STATS_SINCE_CHARGED;
49 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
56 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
63 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
71 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
78 assertEquals(106_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
85 assertEquals(114_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
93 assertEquals(227_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
100 assertEquals(227_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase()
149 assertEquals(150_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testScreenOffBgTimeBase()
[all …]
DBatteryStatsNoteTest.java18 import static android.os.BatteryStats.STATS_SINCE_CHARGED;
46 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
51 assertEquals(0, bgCntr.getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
58 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
61 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
84 long actualTime = aggregTimer.getTotalTimeLocked(300_000, STATS_SINCE_CHARGED); in testNoteStartWakeLocked()
85 long bgTime = aggregTimer.getSubTimer().getTotalTimeLocked(300_000, STATS_SINCE_CHARGED); in testNoteStartWakeLocked()
DLongSamplingCounterArrayTest.java19 import static android.os.BatteryStats.STATS_SINCE_CHARGED;
140 long[] actualVal = mCounterArray.getCountsLocked(STATS_SINCE_CHARGED); in testGetCountsLocked()
145 actualVal = 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()
/frameworks/base/core/java/com/android/internal/os/
DBatteryStatsHelper.java105 private int mStatsType = BatteryStats.STATS_SINCE_CHARGED;
943 return timer.getTotalTimeLocked(rawRealtimeMs, BatteryStats.STATS_SINCE_CHARGED); in getForegroundActivityTotalTimeMs()
DBatteryStatsImpl.java733 case STATS_SINCE_CHARGED: in computeUptime()
745 case STATS_SINCE_CHARGED: in computeRealtime()
817 out.writeLong(computeUptime(uptime, STATS_SINCE_CHARGED)); in writeSummaryToParcel()
818 out.writeLong(computeRealtime(realtime, STATS_SINCE_CHARGED)); in writeSummaryToParcel()
908 } else if (which != STATS_SINCE_CHARGED) { in getCountLocked()
1007 } else if (which != STATS_SINCE_CHARGED) { in getCountsLocked()
1171 } else if (which != STATS_SINCE_CHARGED) { in getCountLocked()
1380 } else if (which != STATS_SINCE_CHARGED) { in getTotalTimeLocked()
1392 } else if (which != STATS_SINCE_CHARGED) { in getCountLocked()
10739 case STATS_SINCE_CHARGED: return mUptime + (curTime-mUptimeStart); in computeUptime()
[all …]
/frameworks/base/core/java/android/os/
DBatteryStats.java172 public static final int STATS_SINCE_CHARGED = 0; field in BatteryStats
3089 which == STATS_SINCE_CHARGED ? getStartCount() : "N/A", in dumpCheckinLocked()
4640 computeBatteryRealtime(rawRealtime, STATS_SINCE_CHARGED))); in dumpLocked()
4647 computeBatteryRealtime(rawRealtime, STATS_SINCE_CHARGED))); in dumpLocked()
5122 numExcessive = which == STATS_SINCE_CHARGED in dumpLocked()
6082 dumpLocked(context, pw, "", STATS_SINCE_CHARGED, reqUid, in dumpLocked()
6175 dumpCheckinLocked(context, pw, STATS_SINCE_CHARGED, -1, in dumpCheckinLocked()