/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/ |
D | BatteryChargeCalculatorTest.java | 77 BatteryUsageStats batteryUsageStats = mStatsRule.apply(calculator); in testDischargeTotals() local 79 assertThat(batteryUsageStats.getConsumedPower()) in testDischargeTotals() 81 assertThat(batteryUsageStats.getDischargePercentage()).isEqualTo(10); in testDischargeTotals() 82 assertThat(batteryUsageStats.getDischargedPowerRange().getLower()) in testDischargeTotals() 84 assertThat(batteryUsageStats.getDischargedPowerRange().getUpper()) in testDischargeTotals() 87 assertThat(batteryUsageStats.getDischargeDurationMs()).isEqualTo(4_000_000); in testDischargeTotals() 88 assertThat(batteryUsageStats.getBatteryTimeRemainingMs()).isEqualTo(8_000_000); in testDischargeTotals() 89 assertThat(batteryUsageStats.getChargeTimeRemainingMs()).isEqualTo(-1); in testDischargeTotals() 97 batteryUsageStats = mStatsRule.apply(calculator); in testDischargeTotals() 99 assertThat(batteryUsageStats.getChargeTimeRemainingMs()).isEqualTo(100_000); in testDischargeTotals() [all …]
|
D | BatteryUsageStatsTest.java | 78 BatteryUsageStats batteryUsageStats = buildBatteryUsageStats1(true).build(); in testBuilder() local 79 assertBatteryUsageStats1(batteryUsageStats, true); in testBuilder() 84 BatteryUsageStats batteryUsageStats = buildBatteryUsageStats1(false).build(); in testBuilder_noProcessStateData() local 85 assertBatteryUsageStats1(batteryUsageStats, false); in testBuilder_noProcessStateData() 449 public void assertBatteryUsageStats1(BatteryUsageStats batteryUsageStats, in assertBatteryUsageStats1() argument 451 assertBatteryUsageStats(batteryUsageStats, 30000, 20, 1000, 2000, 1234, 1000, 3000, 2000); in assertBatteryUsageStats1() 454 batteryUsageStats.getUidBatteryConsumers(); in assertBatteryUsageStats1() 469 batteryUsageStats.getUserBatteryConsumers(); in assertBatteryUsageStats1() 483 assertAggregateBatteryConsumer(batteryUsageStats, in assertBatteryUsageStats1() 487 assertAggregateBatteryConsumer(batteryUsageStats, in assertBatteryUsageStats1() [all …]
|
/frameworks/base/core/tests/batterystatstests/BatteryStatsViewer/src/com/android/frameworks/core/batterystatsviewer/ |
D | BatteryConsumerData.java | 79 BatteryUsageStats batteryUsageStats = batteryUsageStatsList.get(0); in populateForUidBatteryConsumer() local 81 BatteryConsumer requestedBatteryConsumer = getRequestedBatteryConsumer(batteryUsageStats, in populateForUidBatteryConsumer() 92 batteryUsageStats, batteryConsumerId, context.getPackageManager()); in populateForUidBatteryConsumer() 102 computeTotalPower(batteryUsageStats, totalPowerByComponentMah); in populateForUidBatteryConsumer() 104 computeTotalPowerForCustomComponent(batteryUsageStats, totalCustomPowerByComponentMah); in populateForUidBatteryConsumer() 105 computeTotalDuration(batteryUsageStats, totalDurationByComponentMs); in populateForUidBatteryConsumer() 110 batteryUsageStats.getAggregateBatteryConsumer( in populateForUidBatteryConsumer() 116 batteryUsageStats.getAggregateBatteryConsumer( in populateForUidBatteryConsumer() 168 mBatteryConsumerInfo = BatteryConsumerInfoHelper.makeBatteryConsumerInfo(batteryUsageStats, in populateForUidBatteryConsumer() 204 BatteryUsageStats batteryUsageStats = batteryUsageStatsList.get(0); in populateForAggregateBatteryConsumer() local [all …]
|
D | BatteryConsumerInfoHelper.java | 45 @NonNull BatteryUsageStats batteryUsageStats, String batteryConsumerId, in makeBatteryConsumerInfo() 52 batteryUsageStats.getUidBatteryConsumers(); in makeBatteryConsumerInfo() 60 return makeAggregateBatteryConsumerInfo(batteryUsageStats); in makeBatteryConsumerInfo() 138 BatteryUsageStats batteryUsageStats) { in makeAggregateBatteryConsumerInfo() argument 142 info.powerMah = batteryUsageStats.getConsumedPower(); in makeAggregateBatteryConsumerInfo()
|
D | BatteryConsumerPickerActivity.java | 150 final BatteryUsageStats batteryUsageStats = in loadInBackground() local 157 batteryUsageStats, in loadInBackground() 161 for (UidBatteryConsumer consumer : batteryUsageStats.getUidBatteryConsumers()) { in loadInBackground() 163 BatteryConsumerInfoHelper.makeBatteryConsumerInfo(batteryUsageStats, in loadInBackground()
|
D | BatteryStatsViewerActivity.java | 171 List<BatteryUsageStats> batteryUsageStats) { in onLoadFinished() argument 172 onBatteryUsageStatsLoaded(batteryUsageStats); in onLoadFinished() 180 private void onBatteryUsageStatsLoaded(List<BatteryUsageStats> batteryUsageStats) { in onBatteryUsageStatsLoaded() argument 181 mBatteryUsageStats = batteryUsageStats; in onBatteryUsageStatsLoaded()
|
/frameworks/base/tests/BatteryStatsPerfTest/src/com/android/internal/os/ |
D | BatteryUsageStatsPerfTest.java | 69 BatteryUsageStats batteryUsageStats = batteryStatsManager.getBatteryUsageStats( in testGetBatteryUsageStats() local 75 batteryUsageStats.getUidBatteryConsumers(); in testGetBatteryUsageStats() 119 final BatteryUsageStats batteryUsageStats = in testBatteryUsageStatsTransferOverBinder() local 126 assertThat(batteryUsageStats.getBatteryCapacity()).isEqualTo(4000); in testBatteryUsageStatsTransferOverBinder() 127 assertThat(batteryUsageStats.getUidBatteryConsumers()).hasSize(1000); in testBatteryUsageStatsTransferOverBinder() 129 batteryUsageStats.getUidBatteryConsumers().get(0); in testBatteryUsageStatsTransferOverBinder()
|
/frameworks/base/services/core/java/com/android/server/power/stats/ |
D | BatteryUsageStatsSection.java | 31 BatteryUsageStatsSection(BatteryUsageStats batteryUsageStats) { in BatteryUsageStatsSection() argument 33 mBatteryUsageStats = batteryUsageStats; in BatteryUsageStatsSection()
|
D | PowerStatsStore.java | 222 BatteryUsageStats batteryUsageStats) { in storeBatteryUsageStats() argument 224 span.addTimeFrame(monotonicStartTime, batteryUsageStats.getStatsStartTimestamp(), in storeBatteryUsageStats() 225 batteryUsageStats.getStatsDuration()); in storeBatteryUsageStats() 226 span.addSection(new BatteryUsageStatsSection(batteryUsageStats)); in storeBatteryUsageStats()
|
D | BatteryUsageStatsProvider.java | 252 BatteryUsageStats batteryUsageStats = batteryUsageStatsBuilder.build(); in getCurrentBatteryUsageStats() local 254 verify(batteryUsageStats); in getCurrentBatteryUsageStats() 256 return batteryUsageStats; in getCurrentBatteryUsageStats()
|
D | BatteryStatsImpl.java | 12088 final BatteryUsageStats batteryUsageStats; in saveBatteryUsageStatsOnReset() local 12090 batteryUsageStats = mBatteryUsageStatsProvider.getBatteryUsageStats(this, in saveBatteryUsageStatsOnReset() 12102 mMonotonicClock.monotonicTime() - batteryUsageStats.getStatsDuration(); in saveBatteryUsageStatsOnReset() 12104 mPowerStatsStore.storeBatteryUsageStats(monotonicStartTime, batteryUsageStats); in saveBatteryUsageStatsOnReset() 12106 batteryUsageStats.close(); in saveBatteryUsageStatsOnReset()
|
/frameworks/base/core/tests/batterystatstests/BatteryStatsLoadTests/src/com/android/frameworks/core/batterystatsloadtests/ |
D | PowerMetrics.java | 47 public PowerMetrics(BatteryUsageStats batteryUsageStats, int uid) { in PowerMetrics() argument 48 final Range<Double> dischargedPowerRange = batteryUsageStats.getDischargedPowerRange(); in PowerMetrics() 54 for (UidBatteryConsumer uidBatteryConsumer : batteryUsageStats.getUidBatteryConsumers()) { in PowerMetrics()
|
/frameworks/base/core/tests/batterystatstests/BatteryUsageStatsProtoTests/src/com/android/internal/os/ |
D | BatteryUsageStatsPulledTest.java | 377 BatteryUsageStats batteryUsageStats = builder.build(); in testLargeAtomTruncated() local 378 final byte[] bytes = batteryUsageStats.getStatsProto(); in testLargeAtomTruncated()
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | BatteryStatsService.java | 2893 BatteryUsageStats batteryUsageStats = in dumpUsageStats() local 2896 batteryUsageStats.dumpToProto(fd); in dumpUsageStats() 2898 batteryUsageStats.dump(pw, ""); in dumpUsageStats()
|