/frameworks/base/services/core/java/com/android/server/powerstats/ |
D | PowerStatsService.java | 523 public long energyUws = PowerMonitorReadings.ENERGY_UNAVAILABLE; field in PowerStatsService.PowerMonitorState 701 if (state.energyUws != PowerMonitorReadings.ENERGY_UNAVAILABLE in getPowerMonitorReadingsImpl() 704 Math.max(state.prevEnergyUws, state.energyUws - MAX_RANDOM_NOISE_UWS), in getPowerMonitorReadingsImpl() 705 state.energyUws, callingUid); in getPowerMonitorReadingsImpl() 712 state.energyUws, in getPowerMonitorReadingsImpl() 714 state.energyUws != state.prevEnergyUws in getPowerMonitorReadingsImpl() 715 ? (state.energyUws - energy[i]) * 100.0 in getPowerMonitorReadingsImpl() 716 / (state.energyUws - state.prevEnergyUws) in getPowerMonitorReadingsImpl() 721 energy[i] = state.energyUws; in getPowerMonitorReadingsImpl() 748 powerMonitorState.prevEnergyUws = powerMonitorState.energyUws; in updateEnergyConsumers() [all …]
|
/frameworks/base/core/java/android/os/ |
D | PowerMonitorReadings.java | 49 @NonNull long[] energyUws, @NonNull long[] timestampsMs) { in PowerMonitorReadings() argument 51 mEnergyUws = energyUws; in PowerMonitorReadings()
|
/frameworks/base/services/core/java/com/android/server/power/stats/ |
D | BluetoothPowerStatsCollector.java | 310 long[] energyUws = mConsumedEnergyRetriever.getConsumedEnergyUws(mEnergyConsumerIds); in collectEnergyConsumers() local 311 if (energyUws == null) { in collectEnergyConsumers() 315 for (int i = energyUws.length - 1; i >= 0; i--) { in collectEnergyConsumers() 317 ? energyUws[i] - mLastConsumedEnergyUws[i] : 0; in collectEnergyConsumers() 323 mLastConsumedEnergyUws[i] = energyUws[i]; in collectEnergyConsumers()
|
D | WifiPowerStatsCollector.java | 309 long[] energyUws = mConsumedEnergyRetriever.getConsumedEnergyUws(mEnergyConsumerIds); in collectEnergyConsumers() local 310 if (energyUws == null) { in collectEnergyConsumers() 314 for (int i = energyUws.length - 1; i >= 0; i--) { in collectEnergyConsumers() 316 ? energyUws[i] - mLastConsumedEnergyUws[i] : 0; in collectEnergyConsumers() 322 mLastConsumedEnergyUws[i] = energyUws[i]; in collectEnergyConsumers()
|
D | MobileRadioPowerStatsCollector.java | 346 long[] energyUws = mConsumedEnergyRetriever.getConsumedEnergyUws(mEnergyConsumerIds); in collectEnergyConsumers() local 347 if (energyUws == null) { in collectEnergyConsumers() 351 for (int i = energyUws.length - 1; i >= 0; i--) { in collectEnergyConsumers() 353 ? energyUws[i] - mLastConsumedEnergyUws[i] : 0; in collectEnergyConsumers() 359 mLastConsumedEnergyUws[i] = energyUws[i]; in collectEnergyConsumers()
|
D | CpuPowerStatsCollector.java | 389 long[] energyUws = mConsumedEnergyRetriever.getConsumedEnergyUws(mCpuEnergyConsumerIds); in collectEnergyConsumers() local 390 if (energyUws == null) { in collectEnergyConsumers() 394 for (int i = energyUws.length - 1; i >= 0; i--) { in collectEnergyConsumers() 396 ? energyUws[i] - mLastConsumedEnergyUws[i] : 0; in collectEnergyConsumers() 402 mLastConsumedEnergyUws[i] = energyUws[i]; in collectEnergyConsumers()
|
/frameworks/base/services/tests/powerstatstests/src/com/android/server/powerstats/ |
D | PowerStatsServiceTest.java | 374 assertTrue(pssProto.energyMeasurement[i].energyUws == i); in testWrittenMeterDataMatchesReadIncidentReportData() 417 assertTrue(pssProto.energyConsumerResult[i].energyUws == i); in testWrittenModelDataMatchesReadIncidentReportData() 422 assertTrue(pssProto.energyConsumerResult[i].attribution[j].energyUws == j); in testWrittenModelDataMatchesReadIncidentReportData() 1092 public long[] energyUws; field in PowerStatsServiceTest.GetPowerMonitorsResult 1103 energyUws = resultData.getLongArray(IPowerStatsService.KEY_ENERGY); in onReceiveResult() 1144 assertThat(result.energyUws).isEqualTo(new long[]{42, 142, 314, 514}); in getPowerMonitors() 1163 assertThat(result.energyUws).isEqualTo(new long[]{42, 314}); in getPowerMonitors() 1172 assertThat(result.energyUws).isEqualTo(new long[]{298, 399}); in getPowerMonitors()
|
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/ |
D | BluetoothPowerStatsProcessorTest.java | 405 long energyUws = 10 * 3600 * VOLTAGE_MV; in consumedEnergyModel() local 407 new int[]{BLUETOOTH_ENERGY_CONSUMER_ID})).thenReturn(new long[]{energyUws}); in consumedEnergyModel()
|
D | MobileRadioPowerStatsProcessorTest.java | 467 long energyUws = 10_000_000L * VOLTAGE_MV / 1000L; in prepareAggregatedStats_energyConsumerModel() local 469 new int[]{MOBILE_RADIO_ENERGY_CONSUMER_ID})).thenReturn(new long[]{energyUws}); in prepareAggregatedStats_energyConsumerModel()
|
D | WifiPowerStatsProcessorTest.java | 352 long energyUws = 10 * 3600 * VOLTAGE_MV; in consumedEnergyModel_powerController() local 354 new int[]{WIFI_ENERGY_CONSUMER_ID})).thenReturn(new long[]{energyUws}); in consumedEnergyModel_powerController()
|