Home
last modified time | relevance | path

Searched refs:statsType (Results 1 – 23 of 23) sorted by relevance

/frameworks/base/core/java/com/android/internal/os/
DWifiPowerCalculator.java131 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
145 statsType, batteryStats.hasWifiActivityReporting(), consumptionUC); in calculate()
167 statsType, batteryStats.hasWifiActivityReporting(), totalAppDurationMs, in calculate()
180 long rawRealtimeUs, int statsType, boolean hasWifiActivityReporting, in calculateApp() argument
185 statsType); in calculateApp()
188 statsType); in calculateApp()
191 statsType); in calculateApp()
194 statsType); in calculateApp()
203 final long idleTime = counter.getIdleTimeCounter().getCountLocked(statsType); in calculateApp()
204 final long txTime = counter.getTxTimeCounters()[0].getCountLocked(statsType); in calculateApp()
[all …]
DMobileRadioPowerCalculator.java143 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
145 statsType); in calculate()
151 calculateApp(app, u, statsType, mobilePowerPerPacket, total); in calculate()
165 radio.mobileActiveCount = batteryStats.getMobileRadioActiveUnknownCount(statsType); in calculate()
174 private void calculateApp(BatterySipper app, BatteryStats.Uid u, int statsType, in calculateApp() argument
176 app.mobileActive = calculateDuration(u, statsType); in calculateApp()
186 statsType); in calculateApp()
188 statsType); in calculateApp()
189 app.mobileActiveCount = u.getMobileRadioActiveCount(statsType); in calculateApp()
191 statsType); in calculateApp()
[all …]
DCpuPowerCalculator.java121 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
126 calculateApp(app, app.uidObj, statsType, result); in calculate()
131 private void calculateApp(BatterySipper app, BatteryStats.Uid u, int statsType, Result result) { in calculateApp() argument
134 calculatePowerAndDuration(u, powerModel, consumptionUC, statsType, result); in calculateApp()
143 @BatteryConsumer.PowerModel int powerModel, long consumptionUC, int statsType, in calculatePowerAndDuration() argument
145 long durationMs = (u.getUserCpuTimeUs(statsType) + u.getSystemCpuTimeUs(statsType)) / 1000; in calculatePowerAndDuration()
154 powerMah = calculateUidModeledPowerMah(u, statsType); in calculatePowerAndDuration()
172 durationFgMs += ps.getForegroundTime(statsType); in calculatePowerAndDuration()
174 final long costValue = ps.getUserTime(statsType) + ps.getSystemTime(statsType) in calculatePowerAndDuration()
175 + ps.getForegroundTime(statsType); in calculatePowerAndDuration()
[all …]
DMemoryPowerCalculator.java41 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
42 final long durationMs = calculateDuration(batteryStats, rawRealtimeUs, statsType); in calculate()
43 final double powerMah = calculatePower(batteryStats, rawRealtimeUs, statsType); in calculate()
53 private long calculateDuration(BatteryStats batteryStats, long rawRealtimeUs, int statsType) { in calculateDuration() argument
58 rawRealtimeUs, statsType); in calculateDuration()
63 private double calculatePower(BatteryStats batteryStats, long rawRealtimeUs, int statsType) { in calculatePower() argument
69 estimator.calculateDuration(timers.valueAt(i), rawRealtimeUs, statsType); in calculatePower()
DIdlePowerCalculator.java64 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
65 calculatePowerAndDuration(batteryStats, rawRealtimeUs, rawUptimeUs, statsType); in calculate()
82 long rawUptimeUs, int statsType) { in calculatePowerAndDuration() argument
83 long batteryRealtimeUs = batteryStats.computeBatteryRealtime(rawRealtimeUs, statsType); in calculatePowerAndDuration()
84 long batteryUptimeUs = batteryStats.computeBatteryUptime(rawUptimeUs, statsType); in calculatePowerAndDuration()
DSensorPowerCalculator.java72 long rawUptimeUs, int statsType) { in calculateApp() argument
73 app.sensorPowerMah = calculatePowerMah(u, rawRealtimeUs, statsType); in calculateApp()
76 private long calculateDuration(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in calculateDuration() argument
88 durationMs += timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculateDuration()
93 private double calculatePowerMah(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in calculatePowerMah() argument
106 final long sensorTime = timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculatePowerMah()
DAmbientDisplayPowerCalculator.java67 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
69 final long durationMs = calculateDuration(batteryStats, rawRealtimeUs, statsType); in calculate()
83 private long calculateDuration(BatteryStats batteryStats, long rawRealtimeUs, int statsType) { in calculateDuration() argument
84 return batteryStats.getScreenDozeTime(rawRealtimeUs, statsType) / 1000; in calculateDuration()
DScreenPowerCalculator.java118 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
123 rawRealtimeUs, statsType, consumptionUC); in calculate()
160 long rawRealtimeUs, int statsType, long consumptionUC) { in calculateTotalDurationAndPower() argument
162 statsType); in calculateTotalDurationAndPower()
171 rawRealtimeUs, statsType, totalPowerAndDuration.durationMs); in calculateTotalDurationAndPower()
189 private long calculateDuration(BatteryStats batteryStats, long rawRealtimeUs, int statsType) { in calculateDuration() argument
190 return batteryStats.getScreenOnTime(rawRealtimeUs, statsType) / 1000; in calculateDuration()
194 int statsType, long durationMs) { in calculateTotalPowerFromBrightness() argument
198 batteryStats.getScreenBrightnessTime(i, rawRealtimeUs, statsType) / 1000; in calculateTotalPowerFromBrightness()
DMediaPowerCalculator.java37 long rawUptimeUs, int statsType) { in calculateApp() argument
45 final long totalTime = audioTimer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculateApp()
56 final long totalTime = videoTimer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculateApp()
DGnssPowerCalculator.java100 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
101 double averageGnssPowerMa = getAverageGnssPower(batteryStats, rawRealtimeUs, statsType); in calculate()
133 private long computeDuration(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in computeDuration() argument
141 return timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in computeDuration()
148 private double getAverageGnssPower(BatteryStats stats, long rawRealtimeUs, int statsType) { in getAverageGnssPower() argument
157 long timePerLevel = stats.getGpsSignalQualityTime(i, rawRealtimeUs, statsType); in getAverageGnssPower()
DWakelockPowerCalculator.java105 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
114 calculateApp(result, app.uidObj, rawRealtimeUs, statsType); in calculate()
131 calculateRemaining(result, batteryStats, rawRealtimeUs, rawUptimeUs, statsType, in calculate()
140 int statsType) { in calculateApp() argument
152 wakeLockTimeUs += timer.getTotalTimeLocked(rawRealtimeUs, statsType); in calculateApp()
166 long rawUptimeUs, int statsType, double osPowerMah, long osDurationMs, in calculateRemaining() 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()
DBluetoothPowerCalculator.java115 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
125 calculateApp(app, app.uidObj, statsType, total); in calculate()
162 private void calculateApp(BatterySipper app, BatteryStats.Uid u, int statsType, in calculateApp() argument
174 app.btRxBytes = u.getNetworkActivityBytes(BatteryStats.NETWORK_BT_RX_DATA, statsType); in calculateApp()
175 app.btTxBytes = u.getNetworkActivityBytes(BatteryStats.NETWORK_BT_TX_DATA, statsType); in calculateApp()
DPowerCalculator.java56 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
60 calculateApp(app, app.uidObj, rawRealtimeUs, rawUptimeUs, statsType); in calculate()
99 long rawUptimeUs, int statsType) { in calculateApp() argument
DBatteryStatsHelper.java279 public void refreshStats(int statsType, int asUser) { in refreshStats() argument
282 refreshStats(statsType, users); in refreshStats()
289 public void refreshStats(int statsType, List<UserHandle> asUsers) { in refreshStats() argument
296 refreshStats(statsType, users); in refreshStats()
303 public void refreshStats(int statsType, SparseArray<UserHandle> asUsers) { in refreshStats() argument
304 refreshStats(statsType, asUsers, SystemClock.elapsedRealtime() * 1000, in refreshStats()
308 public void refreshStats(int statsType, SparseArray<UserHandle> asUsers, long rawRealtimeUs, in refreshStats() argument
310 if (statsType != BatteryStats.STATS_SINCE_CHARGED) { in refreshStats()
311 Log.w(TAG, "refreshStats called for statsType " + statsType + " but only " in refreshStats()
362 mStatsType = statsType; in refreshStats()
DPhonePowerCalculator.java55 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
56 final long phoneOnTimeMs = batteryStats.getPhoneOnTime(rawRealtimeUs, statsType) / 1000; in calculate()
DCameraPowerCalculator.java70 long rawUptimeUs, int statsType) { in calculateApp() argument
72 rawRealtimeUs, statsType); in calculateApp()
DFlashlightPowerCalculator.java67 long rawUptimeUs, int statsType) { in calculateApp() argument
69 rawRealtimeUs, statsType); in calculateApp()
DBatteryChargeCalculator.java79 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
DUserPowerCalculator.java65 long rawRealtimeUs, long rawUptimeUs, int statsType, SparseArray<UserHandle> asUsers) { in calculate() argument
DCustomMeasuredPowerCalculator.java97 long rawUptimeUs, int statsType) { in calculateApp() argument
DSystemServicePowerCalculator.java121 long rawRealtimeUs, long rawUptimeUs, int statsType, in calculate() argument
/frameworks/base/apex/appsearch/service/java/com/android/server/appsearch/stats/
DPlatformLogger.java490 private int getSamplingIntervalFromConfig(@CallStats.CallType int statsType) { in getSamplingIntervalFromConfig() argument
491 switch (statsType) { in getSamplingIntervalFromConfig()