Searched refs:uidConsumer (Results 1 – 6 of 6) sorted by relevance
157 UidBatteryConsumer uidConsumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testPowerControllerBasedModel_nonMeasured() local158 assertThat(uidConsumer.getUsageDurationMillis(BatteryConsumer.POWER_COMPONENT_WIFI)) in testPowerControllerBasedModel_nonMeasured()160 assertThat(uidConsumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_WIFI)) in testPowerControllerBasedModel_nonMeasured()162 assertThat(uidConsumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_WIFI)) in testPowerControllerBasedModel_nonMeasured()212 UidBatteryConsumer uidConsumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testPowerControllerBasedModel_powerProfile_byProcessState() local213 assertThat(uidConsumer.getUsageDurationMillis(BatteryConsumer.POWER_COMPONENT_WIFI)) in testPowerControllerBasedModel_powerProfile_byProcessState()215 assertThat(uidConsumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_WIFI)) in testPowerControllerBasedModel_powerProfile_byProcessState()217 assertThat(uidConsumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_WIFI)) in testPowerControllerBasedModel_powerProfile_byProcessState()220 final BatteryConsumer.Key foreground = uidConsumer.getKey( in testPowerControllerBasedModel_powerProfile_byProcessState()223 final BatteryConsumer.Key background = uidConsumer.getKey( in testPowerControllerBasedModel_powerProfile_byProcessState()[all …]
142 UidBatteryConsumer uidConsumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testTimerBasedModel_byProcessState() local143 assertThat(uidConsumer.getUsageDurationMillis(BatteryConsumer.POWER_COMPONENT_BLUETOOTH)) in testTimerBasedModel_byProcessState()145 assertThat(uidConsumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_BLUETOOTH)) in testTimerBasedModel_byProcessState()147 assertThat(uidConsumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_BLUETOOTH)) in testTimerBasedModel_byProcessState()150 final BatteryConsumer.Key foreground = uidConsumer.getKey( in testTimerBasedModel_byProcessState()153 final BatteryConsumer.Key background = uidConsumer.getKey( in testTimerBasedModel_byProcessState()156 final BatteryConsumer.Key fgs = uidConsumer.getKey( in testTimerBasedModel_byProcessState()159 final BatteryConsumer.Key cached = uidConsumer.getKey( in testTimerBasedModel_byProcessState()163 assertThat(uidConsumer.getConsumedPower(foreground)).isWithin(PRECISION).of(0.081); in testTimerBasedModel_byProcessState()164 assertThat(uidConsumer.getConsumedPower(background)).isWithin(PRECISION).of(0.0416666); in testTimerBasedModel_byProcessState()[all …]
185 UidBatteryConsumer uidConsumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testCounterBasedModel() local186 assertThat(uidConsumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO)) in testCounterBasedModel()188 assertThat(uidConsumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO)) in testCounterBasedModel()195 assertThat(uidConsumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO)) in testCounterBasedModel()342 UidBatteryConsumer uidConsumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testCounterBasedModel_multipleDefinedRat() local343 assertThat(uidConsumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO)) in testCounterBasedModel_multipleDefinedRat()345 assertThat(uidConsumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO)) in testCounterBasedModel_multipleDefinedRat()352 assertThat(uidConsumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO)) in testCounterBasedModel_multipleDefinedRat()462 UidBatteryConsumer uidConsumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testCounterBasedModel_legacyPowerProfile() local463 assertThat(uidConsumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO)) in testCounterBasedModel_legacyPowerProfile()[all …]
190 android.os.UidBatteryConsumer uidConsumer, in assertSameUidBatteryConsumer() argument195 assertEquals("Uid consumers had mismatched uids", uid, uidConsumer.getUid()); in assertSameUidBatteryConsumer()198 uidConsumer.getTimeInStateMs(android.os.UidBatteryConsumer.STATE_FOREGROUND), in assertSameUidBatteryConsumer()201 uidConsumer.getTimeInStateMs(android.os.UidBatteryConsumer.STATE_BACKGROUND), in assertSameUidBatteryConsumer()204 final long timeInStateMillis = uidConsumer.getTimeInProcessStateMs(processState); in assertSameUidBatteryConsumer()221 uidConsumer, in assertSameUidBatteryConsumer()
711 for (UidBatteryConsumer uidConsumer : uidConsumers) { in updateBatteryUsageStatsOnceInternal()714 final int rawUid = uidConsumer.getUid(); in updateBatteryUsageStatsOnceInternal()727 final BatteryUsage bgUsage = new BatteryUsage(uidConsumer, bgPolicy) in updateBatteryUsageStatsOnceInternal()1143 private static double getConsumedPowerNoThrow(final UidBatteryConsumer uidConsumer, in getConsumedPowerNoThrow() argument1146 return uidConsumer.getConsumedPower(dimens); in getConsumedPowerNoThrow()
2677 UidBatteryConsumer uidConsumer = mock(UidBatteryConsumer.class);2678 doReturn(uid).when(uidConsumer).getUid();2679 doReturn(bg).when(uidConsumer).getConsumedPower(2681 doReturn(fgs).when(uidConsumer).getConsumedPower(2683 doReturn(fg).when(uidConsumer).getConsumedPower(2685 doReturn(cached).when(uidConsumer).getConsumedPower(2687 return uidConsumer;