Home
last modified time | relevance | path

Searched refs:deviceStats (Results 1 – 7 of 7) sorted by relevance

/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DMobileRadioPowerStatsProcessorTest.java250 long[] deviceStats = new long[aggregatedStats.getPowerStatsDescriptor().statsArrayLength]; in powerProfileModel() local
251 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_ON)); in powerProfileModel()
252 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in powerProfileModel()
254 totalPower += statsLayout.getDevicePowerEstimate(deviceStats); in powerProfileModel()
256 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_OTHER)); in powerProfileModel()
257 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in powerProfileModel()
259 totalPower += statsLayout.getDevicePowerEstimate(deviceStats); in powerProfileModel()
323 long[] deviceStats = new long[aggregatedStats.getPowerStatsDescriptor().statsArrayLength]; in energyConsumerModel() local
324 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_ON)); in energyConsumerModel()
325 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in energyConsumerModel()
[all …]
DBinaryStatePowerStatsProcessorTest.java102 long[] deviceStats = new long[stats.getPowerStatsDescriptor().statsArrayLength]; in powerProfileModel() local
103 stats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_ON)); in powerProfileModel()
104 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in powerProfileModel()
107 stats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_OTHER)); in powerProfileModel()
108 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in powerProfileModel()
191 long[] deviceStats = new long[descriptor.statsArrayLength]; in energyConsumerModel() local
192 stats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_ON)); in energyConsumerModel()
193 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in energyConsumerModel()
196 stats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_OTHER)); in energyConsumerModel()
197 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in energyConsumerModel()
DBluetoothPowerStatsProcessorTest.java218 long[] deviceStats = new long[aggregatedStats.getPowerStatsDescriptor().statsArrayLength]; in powerProfileModel_mostlyDataTransfer() local
219 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_ON)); in powerProfileModel_mostlyDataTransfer()
220 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in powerProfileModel_mostlyDataTransfer()
223 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_OTHER)); in powerProfileModel_mostlyDataTransfer()
224 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in powerProfileModel_mostlyDataTransfer()
317 long[] deviceStats = new long[aggregatedStats.getPowerStatsDescriptor().statsArrayLength]; in powerProfileModel_mostlyScan() local
318 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_ON)); in powerProfileModel_mostlyScan()
319 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in powerProfileModel_mostlyScan()
322 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_OTHER)); in powerProfileModel_mostlyScan()
323 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in powerProfileModel_mostlyScan()
[all …]
DWifiPowerStatsProcessorTest.java254 long[] deviceStats = new long[aggregatedStats.getPowerStatsDescriptor().statsArrayLength]; in powerProfileModel_powerController() local
255 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_ON)); in powerProfileModel_powerController()
256 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in powerProfileModel_powerController()
259 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_OTHER)); in powerProfileModel_powerController()
260 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in powerProfileModel_powerController()
367 long[] deviceStats = new long[aggregatedStats.getPowerStatsDescriptor().statsArrayLength]; in consumedEnergyModel_powerController() local
368 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_ON)); in consumedEnergyModel_powerController()
369 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in consumedEnergyModel_powerController()
372 aggregatedStats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_OTHER)); in consumedEnergyModel_powerController()
373 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in consumedEnergyModel_powerController()
[all …]
DCpuPowerStatsCollectorTest.java235 long[] deviceStats = new long[descriptor.statsArrayLength]; in powerStatsDescriptor() local
236 layout.setTimeByScalingStep(deviceStats, 2, 42); in powerStatsDescriptor()
237 layout.setConsumedEnergy(deviceStats, 1, 43); in powerStatsDescriptor()
238 layout.setUsageDuration(deviceStats, 44); in powerStatsDescriptor()
239 layout.setDevicePowerEstimate(deviceStats, 45); in powerStatsDescriptor()
246 assertThat(layout.getTimeByScalingStep(deviceStats, 2)).isEqualTo(42); in powerStatsDescriptor()
249 assertThat(layout.getConsumedEnergy(deviceStats, 1)).isEqualTo(43); in powerStatsDescriptor()
251 assertThat(layout.getUsageDuration(deviceStats)).isEqualTo(44); in powerStatsDescriptor()
253 assertThat(layout.getDevicePowerEstimate(deviceStats)).isEqualTo(45); in powerStatsDescriptor()
433 private void mockKernelCpuStats(long[] deviceStats, SparseArray<long[]> uidToCpuStats, in mockKernelCpuStats() argument
[all …]
DPhoneCallPowerStatsProcessorTest.java215 long[] deviceStats = new long[stats.getPowerStatsDescriptor().statsArrayLength]; in copyEstimatesFromMobileRadioPowerStats() local
216 stats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_ON)); in copyEstimatesFromMobileRadioPowerStats()
217 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in copyEstimatesFromMobileRadioPowerStats()
219 stats.getDeviceStats(deviceStats, states(POWER_STATE_OTHER, SCREEN_STATE_OTHER)); in copyEstimatesFromMobileRadioPowerStats()
220 assertThat(statsLayout.getDevicePowerEstimate(deviceStats)) in copyEstimatesFromMobileRadioPowerStats()
/frameworks/base/services/core/java/com/android/server/power/stats/
DPowerStatsExporter.java145 long[] deviceStats = new long[descriptor.statsArrayLength]; in populateBatteryUsageStatsBuilder() local
154 if (!powerComponentStats.getDeviceStats(deviceStats, states)) { in populateBatteryUsageStatsBuilder()
158 totalPower[0] += layout.getDevicePowerEstimate(deviceStats); in populateBatteryUsageStatsBuilder()