Home
last modified time | relevance | path

Searched refs:STATS_SINCE_CHARGED (Results 1 – 14 of 14) 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 …]
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;
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 …]
DBatteryStatsNoteTest.java18 import static android.os.BatteryStats.STATS_SINCE_CHARGED;
62 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
65 assertEquals(0, bgCntr.getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
72 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
75 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked()
98 long actualTime = aggregTimer.getTotalTimeLocked(300_000, STATS_SINCE_CHARGED); in testNoteStartWakeLocked()
99 long bgTime = aggregTimer.getSubTimer().getTotalTimeLocked(300_000, STATS_SINCE_CHARGED); in testNoteStartWakeLocked()
144 STATS_SINCE_CHARGED); in testNoteUidProcessStateLocked()
150 elapsedTimeUs, STATS_SINCE_CHARGED); in testNoteUidProcessStateLocked()
158 elapsedTimeUs, STATS_SINCE_CHARGED); in testNoteUidProcessStateLocked()
[all …]
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()
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;
873 BatteryStats.STATS_SINCE_CHARGED); in smearScreenBatterySipper()
954 return timer.getTotalTimeLocked(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in getForegroundActivityTotalTimeUs()
DBatteryStatsImpl.java805 case STATS_SINCE_CHARGED: in computeUptime()
817 case STATS_SINCE_CHARGED: in computeRealtime()
889 out.writeLong(computeUptime(uptime, STATS_SINCE_CHARGED)); in writeSummaryToParcel()
890 out.writeLong(computeRealtime(realtime, STATS_SINCE_CHARGED)); in writeSummaryToParcel()
980 } else if (which != STATS_SINCE_CHARGED) { in getCountLocked()
1079 } else if (which != STATS_SINCE_CHARGED) { in getCountsLocked()
1247 } else if (which != STATS_SINCE_CHARGED) { in getCountLocked()
1456 } else if (which != STATS_SINCE_CHARGED) { in getTotalTimeLocked()
1468 } else if (which != STATS_SINCE_CHARGED) { in getCountLocked()
11123 case STATS_SINCE_CHARGED: return mUptime + (curTime-mUptimeStart); in computeUptime()
[all …]
/frameworks/base/core/java/android/os/
DBatteryStats.java180 public static final int STATS_SINCE_CHARGED = 0; field in BatteryStats
3209 which == STATS_SINCE_CHARGED ? getStartCount() : "N/A", in dumpCheckinLocked()
4868 computeBatteryRealtime(rawRealtime, STATS_SINCE_CHARGED))); in dumpLocked()
4875 computeBatteryRealtime(rawRealtime, STATS_SINCE_CHARGED))); in dumpLocked()
5371 numExcessive = which == STATS_SINCE_CHARGED in dumpLocked()
6340 dumpLocked(context, pw, "", STATS_SINCE_CHARGED, reqUid, in dumpLocked()
6433 dumpCheckinLocked(context, pw, STATS_SINCE_CHARGED, -1, in dumpCheckinLocked()