Home
last modified time | relevance | path

Searched refs:rawRealtimeUs (Results 1 – 25 of 25) sorted by relevance

/frameworks/base/services/core/java/com/android/server/power/stats/
DAmbientDisplayPowerCalculator.java54 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
57 final long durationMs = calculateDuration(batteryStats, rawRealtimeUs, in calculate()
59 final double powerMah = calculateTotalPower(powerModel, batteryStats, rawRealtimeUs, in calculate()
68 private long calculateDuration(BatteryStats batteryStats, long rawRealtimeUs, int statsType) { in calculateDuration() argument
69 return batteryStats.getScreenDozeTime(rawRealtimeUs, statsType) / 1000; in calculateDuration()
73 BatteryStats batteryStats, long rawRealtimeUs, long consumptionUC) { in calculateTotalPower() argument
79 return calculateEstimatedPower(batteryStats, rawRealtimeUs); in calculateTotalPower()
83 private double calculateEstimatedPower(BatteryStats batteryStats, long rawRealtimeUs) { in calculateEstimatedPower() argument
87 final long dozeTime = batteryStats.getDisplayScreenDozeTime(display, rawRealtimeUs) in calculateEstimatedPower()
DScreenPowerCalculator.java73 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
79 rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED, consumptionUC); in calculate()
95 app.getBatteryStatsUid(), rawRealtimeUs); in calculate()
109 rawRealtimeUs); in calculate()
132 long rawRealtimeUs, int statsType, long consumptionUC) { in calculateTotalDurationAndPower() argument
133 totalPowerAndDuration.durationMs = calculateDuration(batteryStats, rawRealtimeUs, in calculateTotalDurationAndPower()
143 rawRealtimeUs); in calculateTotalDurationAndPower()
148 BatteryStats.Uid u, long rawRealtimeUs) { in calculateAppUsingEnergyConsumption() argument
149 appPowerAndDuration.durationMs = getProcessForegroundTimeMs(u, rawRealtimeUs); in calculateAppUsingEnergyConsumption()
161 private long calculateDuration(BatteryStats batteryStats, long rawRealtimeUs, int statsType) { in calculateDuration() argument
[all …]
DMemoryPowerCalculator.java47 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
48 final long durationMs = calculateDuration(batteryStats, rawRealtimeUs, in calculate()
50 final double powerMah = calculatePower(batteryStats, rawRealtimeUs, in calculate()
58 private long calculateDuration(BatteryStats batteryStats, long rawRealtimeUs, int statsType) { in calculateDuration() argument
63 rawRealtimeUs, statsType); in calculateDuration()
68 private double calculatePower(BatteryStats batteryStats, long rawRealtimeUs, int statsType) { in calculatePower() argument
74 estimator.calculateDuration(timers.valueAt(i), rawRealtimeUs, statsType); in calculatePower()
DSensorPowerCalculator.java48 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
55 appsPowerMah += calculateApp(app, app.getBatteryStatsUid(), rawRealtimeUs); in calculate()
68 long rawRealtimeUs) { in calculateApp() argument
69 final double powerMah = calculatePowerMah(u, rawRealtimeUs, in calculateApp()
72 calculateDuration(u, rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED)) in calculateApp()
77 private long calculateDuration(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in calculateDuration() argument
89 durationMs += timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculateDuration()
94 private double calculatePowerMah(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in calculatePowerMah() argument
107 final long sensorTime = timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculatePowerMah()
DGnssPowerCalculator.java52 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
54 final double averageGnssPowerMa = getAverageGnssPower(batteryStats, rawRealtimeUs, in calculate()
64 rawRealtimeUs, averageGnssPowerMa, consumptionUC); in calculate()
87 @BatteryConsumer.PowerModel int powerModel, long rawRealtimeUs, in calculateApp() argument
89 final long durationMs = computeDuration(u, rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in calculateApp()
105 private long computeDuration(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in computeDuration() argument
113 return timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in computeDuration()
120 private double getAverageGnssPower(BatteryStats stats, long rawRealtimeUs, int statsType) { in getAverageGnssPower() argument
129 long timePerLevel = stats.getGpsSignalQualityTime(i, rawRealtimeUs, statsType) / 1000; in getAverageGnssPower()
DWakelockPowerCalculator.java52 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
63 calculateApp(result, app.getBatteryStatsUid(), rawRealtimeUs, in calculate()
82 calculateRemaining(result, batteryStats, rawRealtimeUs, rawUptimeUs, in calculate()
91 long wakeTimeMs = calculateWakeTimeMillis(batteryStats, rawRealtimeUs, rawUptimeUs); in calculate()
109 private void calculateApp(PowerAndDuration result, BatteryStats.Uid u, long rawRealtimeUs, in calculateApp() argument
122 wakeLockTimeUs += timer.getTotalTimeLocked(rawRealtimeUs, statsType); in calculateApp()
135 private void calculateRemaining(PowerAndDuration result, BatteryStats stats, long rawRealtimeUs, in calculateRemaining() argument
138 final long wakeTimeMillis = calculateWakeTimeMillis(stats, rawRealtimeUs, rawUptimeUs) in calculateRemaining()
158 private long calculateWakeTimeMillis(BatteryStats batteryStats, long rawRealtimeUs, in calculateWakeTimeMillis() argument
162 batteryStats.getScreenOnTime(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in calculateWakeTimeMillis()
DFlashlightPowerCalculator.java46 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
47 super.calculate(builder, batteryStats, rawRealtimeUs, rawUptimeUs, query); in calculate()
49 final long durationMs = batteryStats.getFlashlightOnTime(rawRealtimeUs, in calculate()
64 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculateApp() argument
66 rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in calculateApp()
DCameraPowerCalculator.java48 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
49 super.calculate(builder, batteryStats, rawRealtimeUs, rawUptimeUs, query); in calculate()
55 rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED) / 1000; in calculate()
75 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculateApp() argument
79 mPowerEstimator.calculateDuration(u.getCameraTurnedOnTimer(), rawRealtimeUs, in calculateApp()
DBatteryChargeCalculator.java37 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
58 .setDischargeDurationMs(batteryStats.getBatteryRealtime(rawRealtimeUs) / 1000); in calculate()
60 final long batteryTimeRemainingMs = batteryStats.computeBatteryTimeRemaining(rawRealtimeUs); in calculate()
65 final long chargeTimeRemainingMs = batteryStats.computeChargeTimeRemaining(rawRealtimeUs); in calculate()
DIdlePowerCalculator.java54 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
55 calculatePowerAndDuration(batteryStats, rawRealtimeUs, rawUptimeUs, in calculate()
70 private void calculatePowerAndDuration(BatteryStats batteryStats, long rawRealtimeUs, in calculatePowerAndDuration() argument
72 long batteryRealtimeUs = batteryStats.computeBatteryRealtime(rawRealtimeUs, statsType); in calculatePowerAndDuration()
DAudioPowerCalculator.java55 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
62 calculateApp(app, total, app.getBatteryStatsUid(), rawRealtimeUs); in calculate()
77 BatteryStats.Uid u, long rawRealtimeUs) { in calculateApp() argument
79 rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in calculateApp()
DVideoPowerCalculator.java52 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
59 calculateApp(app, total, app.getBatteryStatsUid(), rawRealtimeUs); in calculate()
74 BatteryStats.Uid u, long rawRealtimeUs) { in calculateApp() argument
76 rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in calculateApp()
DWifiPowerCalculator.java90 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
114 rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED, in calculate()
143 calculateRemaining(powerDurationAndTraffic, powerModel, batteryStats, rawRealtimeUs, in calculate()
161 long rawRealtimeUs, int statsType, boolean hasWifiActivityReporting, in calculateApp() argument
229 final long wifiRunningTime = u.getWifiRunningTime(rawRealtimeUs, statsType) / 1000; in calculateApp()
233 final long wifiScanTimeMs = u.getWifiScanTime(rawRealtimeUs, statsType) / 1000; in calculateApp()
236 batchTimeMs += u.getWifiBatchedScanTime(bin, rawRealtimeUs, statsType) / 1000; in calculateApp()
260 @BatteryConsumer.PowerModel int powerModel, BatteryStats stats, long rawRealtimeUs, in calculateRemaining() argument
290 totalDurationMs = stats.getGlobalWifiRunningTime(rawRealtimeUs, statsType) / 1000; in calculateRemaining()
DPowerCalculator.java54 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
59 calculateApp(app, app.getBatteryStatsUid(), rawRealtimeUs, rawUptimeUs, query); in calculate()
72 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculateApp() argument
DUsageBasedPowerEstimator.java42 public long calculateDuration(BatteryStats.Timer timer, long rawRealtimeUs, int statsType) { in calculateDuration() argument
43 return timer == null ? 0 : timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculateDuration()
DPhonePowerCalculator.java44 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
48 final long phoneOnTimeMs = batteryStats.getPhoneOnTime(rawRealtimeUs, in calculate()
DMobileRadioPowerCalculator.java127 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
143 totalActivePowerMah = calculateActiveModemPowerMah(batteryStats, rawRealtimeUs); in calculate()
204 long totalActiveDurationMs = batteryStats.getMobileRadioActiveTime(rawRealtimeUs, in calculate()
285 final long scanningTimeMs = batteryStats.getPhoneSignalScanningTime(rawRealtimeUs, in calculate()
289 long strengthTimeMs = batteryStats.getPhoneSignalStrengthTime(i, rawRealtimeUs, in calculate()
DUserPowerCalculator.java42 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
DCustomEnergyConsumerPowerCalculator.java48 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
DSystemServicePowerCalculator.java67 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
DBluetoothPowerCalculator.java72 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
DCpuPowerCalculator.java104 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument
DBatteryStatsImpl.java7592 final long rawRealtimeUs = SystemClock.elapsedRealtime() * 1000; in getGpsBatteryDrainMaMs() local
7596 * (getGpsSignalQualityTime(i, rawRealtimeUs, which) / 1000); in getGpsBatteryDrainMaMs()
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DUserPowerCalculatorTest.java144 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculateApp() argument
145 long durationMs = u.getAudioTurnedOnTimer().getTotalTimeLocked(rawRealtimeUs, 0); in calculateApp()
160 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculateApp() argument
161 long durationMs = u.getVideoTurnedOnTimer().getTotalTimeLocked(rawRealtimeUs, 0); in calculateApp()
/frameworks/base/core/java/android/os/
DBatteryStats.java3869 long rawRealtimeUs, int which, String prefix, String type) { in printTimer() argument
3873 rawRealtimeUs, which) + 500) / 1000; in printTimer()
3885 final long maxDurationMs = timer.getMaxDurationMsLocked(rawRealtimeUs/1000); in printTimer()
3891 final long currentMs = timer.getCurrentDurationMsLocked(rawRealtimeUs/1000); in printTimer()
4014 Timer timer, long rawRealtimeUs, int which) { in dumpTimer() argument
4019 final long timeMs = roundUsToMs(timer.getTotalTimeLocked(rawRealtimeUs, which)); in dumpTimer()
4021 final long maxDurationMs = timer.getMaxDurationMsLocked(rawRealtimeUs / 1000); in dumpTimer()
4022 final long curDurationMs = timer.getCurrentDurationMsLocked(rawRealtimeUs / 1000); in dumpTimer()
4023 final long totalDurationMs = timer.getTotalDurationMsLocked(rawRealtimeUs / 1000); in dumpTimer()
7978 final long rawRealtimeUs = rawRealtimeMs * 1000; in dumpProtoAppsLocked() local
[all …]