/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/ |
D | CustomEnergyConsumerPowerCalculatorTest.java | 43 private static final double PRECISION = 0.00001; field in CustomEnergyConsumerPowerCalculatorTest 73 .isWithin(PRECISION).of(8.333333); in testMeasuredEnergyCopiedIntoBatteryConsumers() 76 .isWithin(PRECISION).of(33.33333); in testMeasuredEnergyCopiedIntoBatteryConsumers() 81 .isWithin(PRECISION).of(27.77777); in testMeasuredEnergyCopiedIntoBatteryConsumers() 84 .isWithin(PRECISION).of(55.55555); in testMeasuredEnergyCopiedIntoBatteryConsumers() 89 .isWithin(PRECISION).of(27.77777); in testMeasuredEnergyCopiedIntoBatteryConsumers() 92 .isWithin(PRECISION).of(55.55555); in testMeasuredEnergyCopiedIntoBatteryConsumers()
|
D | BinaryStatePowerStatsProcessorTest.java | 53 private static final double PRECISION = 0.00001; field in BinaryStatePowerStatsProcessorTest 105 .isWithin(PRECISION).of(expectedPower * 0.25); in powerProfileModel() 109 .isWithin(PRECISION).of(expectedPower * 0.75); in powerProfileModel() 119 .isWithin(PRECISION).of(expectedPower1 * 2500 / 6000); in powerProfileModel() 124 .isWithin(PRECISION).of(expectedPower1 * 2500 / 6000); in powerProfileModel() 129 .isWithin(PRECISION).of(expectedPower1 * 1000 / 6000); in powerProfileModel() 138 .isWithin(PRECISION).of(expectedPower2); in powerProfileModel() 143 .isWithin(PRECISION).of(0); in powerProfileModel() 194 .isWithin(PRECISION).of(0.25); in energyConsumerModel() 198 .isWithin(PRECISION).of(0.35 + 0.4); in energyConsumerModel() [all …]
|
D | MobileRadioPowerStatsProcessorTest.java | 74 private static final double PRECISION = 0.00001; field in MobileRadioPowerStatsProcessorTest 253 .isWithin(PRECISION).of(0.319722); in powerProfileModel() 258 .isWithin(PRECISION).of(0.959166); in powerProfileModel() 261 assertThat(totalPower).isWithin(PRECISION).of(1.27888); in powerProfileModel() 276 .isWithin(PRECISION).of(0.17625); in powerProfileModel() 282 .isWithin(PRECISION).of(0.17625); in powerProfileModel() 288 .isWithin(PRECISION).of(0.3525); in powerProfileModel() 295 .isWithin(PRECISION).of(0.05875); in powerProfileModel() 301 .isWithin(PRECISION).of(0.17625); in powerProfileModel() 305 .isWithin(PRECISION).of(0.94); in powerProfileModel() [all …]
|
D | BluetoothPowerStatsProcessorTest.java | 70 private static final double PRECISION = 0.00001; field in BluetoothPowerStatsProcessorTest 221 .isWithin(PRECISION).of(expectedPower * 0.25); in powerProfileModel_mostlyDataTransfer() 225 .isWithin(PRECISION).of(expectedPower * 0.75); in powerProfileModel_mostlyDataTransfer() 236 .isWithin(PRECISION).of(expectedPower1 * 0.25); in powerProfileModel_mostlyDataTransfer() 241 .isWithin(PRECISION).of(expectedPower1 * 0.25); in powerProfileModel_mostlyDataTransfer() 246 .isWithin(PRECISION).of(expectedPower1 * 0.5); in powerProfileModel_mostlyDataTransfer() 256 .isWithin(PRECISION).of(expectedPower2 * 0.25); in powerProfileModel_mostlyDataTransfer() 261 .isWithin(PRECISION).of(expectedPower2 * 0.75); in powerProfileModel_mostlyDataTransfer() 320 .isWithin(PRECISION).of(expectedPower * 0.25); in powerProfileModel_mostlyScan() 324 .isWithin(PRECISION).of(expectedPower * 0.75); in powerProfileModel_mostlyScan() [all …]
|
D | GnssPowerCalculatorTest.java | 43 private static final double PRECISION = 0.00001; field in GnssPowerCalculatorTest 70 .isWithin(PRECISION).of(0.1); in testTimerBasedModel() 76 .isWithin(PRECISION).of(0.1); in testTimerBasedModel() 82 .isWithin(PRECISION).of(0.1); in testTimerBasedModel() 109 .isWithin(PRECISION).of(2.77777); in testMeasuredEnergyBasedModel() 117 .isWithin(PRECISION).of(5.55555); in testMeasuredEnergyBasedModel() 123 .isWithin(PRECISION).of(8.333333); in testMeasuredEnergyBasedModel() 129 .isWithin(PRECISION).of(8.333333); in testMeasuredEnergyBasedModel()
|
D | CameraPowerCalculatorTest.java | 43 private static final double PRECISION = 0.00001; field in CameraPowerCalculatorTest 72 .isWithin(PRECISION).of(0.1); in testTimerBasedModel() 80 .isWithin(PRECISION).of(0.2); in testTimerBasedModel() 89 .isWithin(PRECISION).of(0.3); in testTimerBasedModel() 98 .isWithin(PRECISION).of(0.3); in testTimerBasedModel() 124 .isWithin(PRECISION).of(0.2); in testEnergyConsumptionBasedModel() 132 .isWithin(PRECISION).of(0.3); in testEnergyConsumptionBasedModel() 141 .isWithin(PRECISION).of(0.5); in testEnergyConsumptionBasedModel() 150 .isWithin(PRECISION).of(0.5); in testEnergyConsumptionBasedModel()
|
D | BatteryChargeCalculatorTest.java | 46 private static final double PRECISION = 0.00001; field in BatteryChargeCalculatorTest 80 .isWithin(PRECISION).of(1200.0); // 3,600 - 2,400 in testDischargeTotals() 83 .isWithin(PRECISION).of(360.0); in testDischargeTotals() 85 .isWithin(PRECISION).of(400.0); in testDischargeTotals() 122 .isWithin(PRECISION).of(380.0); // 9.5% of 4,000. in testDischargeTotals_chargeUahUnavailable() 125 .isWithin(PRECISION).of(360.0); // 9% of 4,000 in testDischargeTotals_chargeUahUnavailable() 127 .isWithin(PRECISION).of(400.0); // 10% of 4,000 in testDischargeTotals_chargeUahUnavailable()
|
D | ScreenPowerCalculatorTest.java | 47 private static final double PRECISION = 0.00001; field in ScreenPowerCalculatorTest 105 .isWithin(PRECISION).of(64.81481); in testMeasuredEnergyBasedModel() 117 .isWithin(PRECISION).of(101.85185); in testMeasuredEnergyBasedModel() 127 .isWithin(PRECISION).of(166.66666); in testMeasuredEnergyBasedModel() 136 .isWithin(PRECISION).of(166.66666); in testMeasuredEnergyBasedModel() 201 .isWithin(PRECISION).of(388.88888); in testMeasuredEnergyBasedModel_multiDisplay() 213 .isWithin(PRECISION).of(41.66666); in testMeasuredEnergyBasedModel_multiDisplay() 225 .isWithin(PRECISION).of(347.22222); in testMeasuredEnergyBasedModel_multiDisplay() 233 .isWithin(PRECISION).of(388.88888); in testMeasuredEnergyBasedModel_multiDisplay() 275 .isWithin(PRECISION).of(23.0); in testPowerProfileBasedModel() [all …]
|
D | WifiPowerStatsProcessorTest.java | 73 private static final double PRECISION = 0.00001; field in WifiPowerStatsProcessorTest 257 .isWithin(PRECISION).of(expectedPower * 0.25); in powerProfileModel_powerController() 261 .isWithin(PRECISION).of(expectedPower * 0.75); in powerProfileModel_powerController() 273 .isWithin(PRECISION).of(expectedPower1 * 0.25); in powerProfileModel_powerController() 278 .isWithin(PRECISION).of(expectedPower1 * 0.25); in powerProfileModel_powerController() 283 .isWithin(PRECISION).of(expectedPower1 * 0.5); in powerProfileModel_powerController() 294 .isWithin(PRECISION).of(expectedPower2 * 0.25); in powerProfileModel_powerController() 299 .isWithin(PRECISION).of(expectedPower2 * 0.75); in powerProfileModel_powerController() 370 .isWithin(PRECISION).of(expectedPower * 0.25); in consumedEnergyModel_powerController() 374 .isWithin(PRECISION).of(expectedPower * 0.75); in consumedEnergyModel_powerController() [all …]
|
D | CpuPowerCalculatorTest.java | 64 private static final double PRECISION = 0.00001; field in CpuPowerCalculatorTest 194 .isWithin(PRECISION).of(1.031677); in testTimerBasedModel() 203 .isWithin(PRECISION).of(2.489544); in testTimerBasedModel() 210 .isWithin(PRECISION).of(3.52122); in testTimerBasedModel() 216 .isWithin(PRECISION).of(3.52122); in testTimerBasedModel() 266 .isWithin(PRECISION).of(3.18877); in testMeasuredEnergyBasedModel() 275 .isWithin(PRECISION).of(7.44072); in testMeasuredEnergyBasedModel() 282 .isWithin(PRECISION).of(10.62949); in testMeasuredEnergyBasedModel() 288 .isWithin(PRECISION).of(10.62949); in testMeasuredEnergyBasedModel() 385 assertThat(uidConsumer1.getConsumedPower(foreground)).isWithin(PRECISION).of(1.611088); in testTimerBasedModel_byProcessState() [all …]
|
D | WifiPowerCalculatorTest.java | 62 private static final double PRECISION = 0.00001; field in WifiPowerCalculatorTest 161 .isWithin(PRECISION).of(0.3964); in testPowerControllerBasedModel_nonMeasured() 169 .isWithin(PRECISION).of(0.86666); in testPowerControllerBasedModel_nonMeasured() 175 .isWithin(PRECISION).of(0.866666); in testPowerControllerBasedModel_nonMeasured() 216 .isWithin(PRECISION).of(2.0214666); in testPowerControllerBasedModel_powerProfile_byProcessState() 230 assertThat(uidConsumer.getConsumedPower(foreground)).isWithin(PRECISION).of(1.1214666); in testPowerControllerBasedModel_powerProfile_byProcessState() 231 assertThat(uidConsumer.getConsumedPower(background)).isWithin(PRECISION).of(0.9); in testPowerControllerBasedModel_powerProfile_byProcessState() 232 assertThat(uidConsumer.getConsumedPower(fgs)).isWithin(PRECISION).of(0); in testPowerControllerBasedModel_powerProfile_byProcessState() 250 .isWithin(PRECISION).of(0.2214666 / (0.2214666 + 0.645200) * 1_000_000 / 3600000); in testPowerControllerBasedModel_measured() 258 .isWithin(PRECISION).of(0.27777); in testPowerControllerBasedModel_measured() [all …]
|
D | MobileRadioPowerCalculatorTest.java | 70 private static final double PRECISION = 0.00001; field in MobileRadioPowerCalculatorTest 166 .isWithin(PRECISION).of(1.27888); in testCounterBasedModel() 180 .isWithin(PRECISION).of(0.94); in testCounterBasedModel() 187 .isWithin(PRECISION).of(0.705); in testCounterBasedModel() 194 .isWithin(PRECISION).of(0.235); in testCounterBasedModel() 323 .isWithin(PRECISION).of(1.43826); in testCounterBasedModel_multipleDefinedRat() 337 .isWithin(PRECISION).of(1.09938); in testCounterBasedModel_multipleDefinedRat() 344 .isWithin(PRECISION).of(0.82453); in testCounterBasedModel_multipleDefinedRat() 351 .isWithin(PRECISION).of(0.27484); in testCounterBasedModel_multipleDefinedRat() 443 .isWithin(PRECISION).of(1.27888); in testCounterBasedModel_legacyPowerProfile() [all …]
|
D | WakelockPowerCalculatorTest.java | 45 private static final double PRECISION = 0.00001; field in WakelockPowerCalculatorTest 78 .isWithin(PRECISION).of(0.1); in testTimerBasedModel() 84 .isWithin(PRECISION).of(0.5); in testTimerBasedModel() 90 .isWithin(PRECISION).of(0.6); in testTimerBasedModel() 94 .isWithin(PRECISION).of(0.1); in testTimerBasedModel()
|
D | SystemServicePowerCalculatorTest.java | 68 private static final double PRECISION = 0.000001; field in SystemServicePowerCalculatorTest 133 .isWithin(PRECISION).of(1.888888); in testPowerProfileBasedModel() 136 .isWithin(PRECISION).of(17.0); in testPowerProfileBasedModel() 139 .isWithin(PRECISION).of(-18.888888); in testPowerProfileBasedModel() 142 .isWithin(PRECISION).of(18.888888); in testPowerProfileBasedModel() 145 .isWithin(PRECISION).of(18.888888); in testPowerProfileBasedModel() 167 .isWithin(PRECISION).of(2.105425); in testMeasuredEnergyBasedModel() 170 .isWithin(PRECISION).of(18.948825); in testMeasuredEnergyBasedModel() 173 .isWithin(PRECISION).of(-21.054250); in testMeasuredEnergyBasedModel() 176 .isWithin(PRECISION).of(21.054250); in testMeasuredEnergyBasedModel() [all …]
|
D | VideoPowerCalculatorTest.java | 43 private static final double PRECISION = 0.00001; field in VideoPowerCalculatorTest 66 .isWithin(PRECISION).of(0.1); in testTimerBasedModel() 73 .isWithin(PRECISION).of(0.1); in testTimerBasedModel() 80 .isWithin(PRECISION).of(0.1); in testTimerBasedModel()
|
D | AudioPowerCalculatorTest.java | 43 private static final double PRECISION = 0.00001; field in AudioPowerCalculatorTest 66 .isWithin(PRECISION).of(0.1); in testTimerBasedModel() 73 .isWithin(PRECISION).of(0.1); in testTimerBasedModel() 80 .isWithin(PRECISION).of(0.1); in testTimerBasedModel()
|
D | BluetoothPowerCalculatorTest.java | 58 private static final double PRECISION = 0.00001; field in BluetoothPowerCalculatorTest 146 .isWithin(PRECISION).of(0.1226666); 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() 165 assertThat(uidConsumer.getConsumedPower(fgs)).isWithin(PRECISION).of(0); in testTimerBasedModel_byProcessState() 166 assertThat(uidConsumer.getConsumedPower(cached)).isWithin(PRECISION).of(0); in testTimerBasedModel_byProcessState() 266 .isWithin(PRECISION).of(0.8220561); in testMeasuredEnergyBasedModel_byProcessState() 283 assertThat(uidConsumer.getConsumedPower(foreground)).isWithin(PRECISION).of(0.4965352); in testMeasuredEnergyBasedModel_byProcessState() 284 assertThat(uidConsumer.getConsumedPower(background)).isWithin(PRECISION).of(0.3255208); in testMeasuredEnergyBasedModel_byProcessState() 285 assertThat(uidConsumer.getConsumedPower(fgs)).isWithin(PRECISION).of(0); in testMeasuredEnergyBasedModel_byProcessState() [all …]
|
D | IdlePowerCalculatorTest.java | 41 private static final double PRECISION = 0.00001; field in IdlePowerCalculatorTest 60 .isWithin(PRECISION).of(0.7); in testTimerBasedModel() 66 .isWithin(PRECISION).of(0); in testTimerBasedModel()
|
D | SensorPowerCalculatorTest.java | 49 private static final double PRECISION = 0.00001; field in SensorPowerCalculatorTest 84 .isWithin(PRECISION).of(0.5); in testTimerBasedModel() 88 .isWithin(PRECISION).of(0.5); in testTimerBasedModel() 92 .isWithin(PRECISION).of(0.5); in testTimerBasedModel()
|
D | AmbientDisplayPowerCalculatorTest.java | 43 private static final double PRECISION = 0.00001; field in AmbientDisplayPowerCalculatorTest 81 .isWithin(PRECISION).of(27.777778); in testMeasuredEnergyBasedModel() 142 .isWithin(PRECISION).of(83.33333); in testMeasuredEnergyBasedModel_multiDisplay() 165 .isWithin(PRECISION).of(15.0); in testPowerProfileBasedModel() 197 .isWithin(PRECISION).of(35.0); in testPowerProfileBasedModel_multiDisplay()
|
D | MemoryPowerCalculatorTest.java | 41 private static final double PRECISION = 0.00001; field in MemoryPowerCalculatorTest 67 .isWithin(PRECISION).of(0.7); in testTimerBasedModel()
|
D | FlashlightPowerCalculatorTest.java | 43 private static final double PRECISION = 0.00001; field in FlashlightPowerCalculatorTest 66 .isWithin(PRECISION).of(0.1); in testTimerBasedModel()
|
D | PhoneCallPowerStatsProcessorTest.java | 61 private static final double PRECISION = 0.00001; field in PhoneCallPowerStatsProcessorTest 218 .isWithin(PRECISION).of(0.7); in copyEstimatesFromMobileRadioPowerStats() 221 .isWithin(PRECISION).of(2.1); in copyEstimatesFromMobileRadioPowerStats()
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | SparseDoubleArrayTest.java | 39 private static final double PRECISION = 0.000000001; field in SparseDoubleArrayTest 74 assertEquals(6.1 - 1.2, sda.get(4), PRECISION); in testIncrementValue() 75 assertEquals(-1.2, sda.get(2), PRECISION); in testIncrementValue() 104 assertEquals("Wrong key at index " + i, expectedKey, sda.keyAt(i), PRECISION); in testKeyValueAt() 105 assertEquals("Wrong value at index " + i, expectedValue, sda.valueAt(i), PRECISION); in testKeyValueAt()
|
/frameworks/base/services/tests/powerservicetests/src/com/android/server/power/ |
D | PowerGroupTest.java | 77 private static final float PRECISION = 0.001f; field in PowerGroupTest 276 assertThat(displayPowerRequest.screenBrightnessOverride).isWithin(PRECISION).of(BRIGHTNESS); in testUpdateWhileAwake_UpdatesDisplayPowerRequest() 283 assertThat(displayPowerRequest.screenLowPowerBrightnessFactor).isWithin(PRECISION).of( in testUpdateWhileAwake_UpdatesDisplayPowerRequest() 316 assertThat(displayPowerRequest.screenBrightnessOverride).isWithin(PRECISION).of(BRIGHTNESS); in testUpdateWhileDozing_UpdatesDisplayPowerRequest() 320 assertThat(displayPowerRequest.dozeScreenBrightness).isWithin(PRECISION).of( in testUpdateWhileDozing_UpdatesDisplayPowerRequest() 323 assertThat(displayPowerRequest.screenLowPowerBrightnessFactor).isWithin(PRECISION).of( in testUpdateWhileDozing_UpdatesDisplayPowerRequest() 355 assertThat(displayPowerRequest.screenBrightnessOverride).isWithin(PRECISION).of(BRIGHTNESS); in testUpdateWhileDozing_DozeAfterScreenOff() 362 assertThat(displayPowerRequest.screenLowPowerBrightnessFactor).isWithin(PRECISION).of( in testUpdateWhileDozing_DozeAfterScreenOff() 393 assertThat(displayPowerRequest.screenBrightnessOverride).isWithin(PRECISION).of(BRIGHTNESS); in testUpdateQuiescent() 400 assertThat(displayPowerRequest.screenLowPowerBrightnessFactor).isWithin(PRECISION).of( in testUpdateQuiescent() [all …]
|