Home
last modified time | relevance | path

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

123

/frameworks/base/core/java/com/android/internal/os/
DSensorPowerCalculator.java60 private double calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
71 protected void calculateApp(BatterySipper app, BatteryStats.Uid u, long rawRealtimeUs, in calculateApp()
76 private long calculateDuration(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in calculateDuration()
78 final SparseArray<? extends BatteryStats.Uid.Sensor> sensorStats = u.getSensorStats(); in calculateDuration()
82 if (sensorHandle == BatteryStats.Uid.Sensor.GPS) { in calculateDuration()
86 final BatteryStats.Uid.Sensor sensor = sensorStats.valueAt(ise); in calculateDuration()
93 private double calculatePowerMah(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in calculatePowerMah()
95 final SparseArray<? extends BatteryStats.Uid.Sensor> sensorStats = u.getSensorStats(); in calculatePowerMah()
100 if (sensorHandle == BatteryStats.Uid.Sensor.GPS) { in calculatePowerMah()
104 final BatteryStats.Uid.Sensor sensor = sensorStats.valueAt(ise); in calculatePowerMah()
DBatteryUsageStatsProvider.java163 SparseArray<? extends BatteryStats.Uid> uidStats = mStats.getUidStats(); in getCurrentBatteryUsageStats()
165 final BatteryStats.Uid uid = uidStats.valueAt(i); in getCurrentBatteryUsageStats()
203 private long getProcessForegroundTimeMs(BatteryStats.Uid uid, long realtimeUs) { in getProcessForegroundTimeMs()
204 final long topStateDurationUs = uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_TOP, in getProcessForegroundTimeMs()
218 BatteryStats.Uid.PROCESS_STATE_FOREGROUND, realtimeUs, in getProcessForegroundTimeMs()
222 BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE, realtimeUs, in getProcessForegroundTimeMs()
228 private long getProcessBackgroundTimeMs(BatteryStats.Uid uid, long realtimeUs) { in getProcessBackgroundTimeMs()
229 return uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_BACKGROUND, realtimeUs, in getProcessBackgroundTimeMs()
DGnssPowerCalculator.java79 private double calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
114 private void calculateApp(BatterySipper app, BatteryStats.Uid u, in calculateApp()
133 private long computeDuration(BatteryStats.Uid u, long rawRealtimeUs, int statsType) { in computeDuration()
134 final SparseArray<? extends BatteryStats.Uid.Sensor> sensorStats = u.getSensorStats(); in computeDuration()
135 final BatteryStats.Uid.Sensor sensor = sensorStats.get(BatteryStats.Uid.Sensor.GPS); in computeDuration()
DSystemServicePowerCalculator.java67 final BatteryStats.Uid systemUid = batteryStats.getUidStats().get(Process.SYSTEM_UID); in calculate()
102 final BatteryStats.Uid uid = app.getBatteryStatsUid(); in calculate()
123 final BatteryStats.Uid systemUid = batteryStats.getUidStats().get(Process.SYSTEM_UID); in calculate()
160 final BatteryStats.Uid uid = app.uidObj; in calculate()
169 BatteryStats.Uid systemUid, long consumptionUC) { in calculatePowerUsingMeasuredConsumption()
DCpuPowerCalculator.java107 private void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
131 private void calculateApp(BatterySipper app, BatteryStats.Uid u, int statsType, Result result) { in calculateApp()
142 private void calculatePowerAndDuration(BatteryStats.Uid u, in calculatePowerAndDuration()
167 final ArrayMap<String, ? extends BatteryStats.Uid.Proc> processStats = u.getProcessStats(); in calculatePowerAndDuration()
170 final BatteryStats.Uid.Proc ps = processStats.valueAt(i); in calculatePowerAndDuration()
207 public double calculateUidModeledPowerMah(BatteryStats.Uid u, int statsType) { in calculateUidModeledPowerMah()
DScreenPowerCalculator.java176 BatteryStats.Uid u, long rawRealtimeUs) { in calculateAppUsingMeasuredEnergy()
220 final BatteryStats.Uid uid = sippers.get(i).uidObj; in smearScreenBatterySipper()
249 final BatteryStats.Uid uid = uidBatteryConsumerBuilders.valueAt(i).getBatteryStatsUid(); in smearScreenBatteryDrain()
270 public long getProcessForegroundTimeMs(BatteryStats.Uid uid, long rawRealTimeUs) { in getProcessForegroundTimeMs()
271 final int[] foregroundTypes = {BatteryStats.Uid.PROCESS_STATE_TOP}; in getProcessForegroundTimeMs()
287 public long getForegroundActivityTotalTimeUs(BatteryStats.Uid uid, long rawRealtimeUs) { in getForegroundActivityTotalTimeUs()
DMobileRadioPowerCalculator.java98 final BatteryStats.Uid uid = app.getBatteryStatsUid(); in calculate()
123 private void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
150 final BatteryStats.Uid u = app.uidObj; in calculate()
174 private void calculateApp(BatterySipper app, BatteryStats.Uid u, int statsType, in calculateApp()
203 private long calculateDuration(BatteryStats.Uid u, int statsType) { in calculateDuration()
207 private double calculatePower(BatteryStats.Uid u, @BatteryConsumer.PowerModel int powerModel, in calculatePower()
DCameraPowerCalculator.java58 protected void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
69 protected void calculateApp(BatterySipper app, BatteryStats.Uid u, long rawRealtimeUs, in calculateApp()
DFlashlightPowerCalculator.java56 protected void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
66 protected void calculateApp(BatterySipper app, BatteryStats.Uid u, long rawRealtimeUs, in calculateApp()
DBatteryStatsImpl.java495 final Uid u; in updateProcStateCpuTimes()
571 final Uid u = getAvailableUidStatsLocked(mapUid(uid)); in copyFromAllUidsCpuTimes()
590 if (procState >= 0 && procState < Uid.NUM_PROCESS_STATE) { in copyFromAllUidsCpuTimes()
714 final SparseArray<BatteryStatsImpl.Uid> mUidStats = new SparseArray<>();
2147 final Uid mUid;
2164 BatchTimer(Clocks clocks, Uid uid, int type, TimeBase timeBase, Parcel in) { in BatchTimer()
2172 BatchTimer(Clocks clocks, Uid uid, int type, TimeBase timeBase) { in BatchTimer()
2319 public DurationTimer(Clocks clocks, Uid uid, int type, ArrayList<StopwatchTimer> timerPool, in DurationTimer()
2327 public DurationTimer(Clocks clocks, Uid uid, int type, ArrayList<StopwatchTimer> timerPool, in DurationTimer()
2502 final Uid mUid;
[all …]
DBatterySipper.java19 import android.os.BatteryStats.Uid;
34 public Uid uidObj;
175 public BatterySipper(DrainType drainType, Uid uid, double value) { in BatterySipper()
DWakelockPowerCalculator.java139 private void calculateApp(PowerAndDuration result, BatteryStats.Uid u, long rawRealtimeUs, in calculateApp()
142 final ArrayMap<String, ? extends BatteryStats.Uid.Wakelock> wakelockStats = in calculateApp()
146 final BatteryStats.Uid.Wakelock wakelock = wakelockStats.valueAt(i); in calculateApp()
DCustomMeasuredPowerCalculator.java70 private double[] calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
96 protected void calculateApp(BatterySipper app, BatteryStats.Uid u, long rawRealtimeUs, in calculateApp()
/frameworks/base/tools/powermodel/src/com/android/powermodel/
DSpecialApp.java46 REMAINDER(Uid.UID_SYNTHETIC),
52 GLOBAL(Uid.UID_SYNTHETIC),
56 GOOGLE_SERVICES(Uid.UID_VARIES);
61 public static class Uid { class in SpecialApp
/frameworks/base/services/core/java/com/android/server/am/
DHealthStatsBatteryStatsWriter.java50 public void writeUid(HealthStatsWriter uidWriter, BatteryStats bs, BatteryStats.Uid uid) { in writeUid()
53 SparseArray<? extends BatteryStats.Uid.Sensor> sensors; in writeUid()
54 SparseArray<? extends BatteryStats.Uid.Pid> pids; in writeUid()
85 for (final Map.Entry<String,? extends BatteryStats.Uid.Wakelock> entry: in writeUid()
88 final BatteryStats.Uid.Wakelock wakelock = entry.getValue(); in writeUid()
126 if (sensorId == BatteryStats.Uid.Sensor.GPS) { in writeUid()
145 for (final Map.Entry<String,? extends BatteryStats.Uid.Proc> entry: in writeUid()
153 for (final Map.Entry<String,? extends BatteryStats.Uid.Pkg> entry: in writeUid()
255 uid.getProcessStateTimer(BatteryStats.Uid.PROCESS_STATE_TOP)); in writeUid()
259 uid.getProcessStateTimer(BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE)); in writeUid()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsImplTest.java20 import static android.os.BatteryStats.Uid.NUM_PROCESS_STATE;
21 import static android.os.BatteryStats.Uid.PROCESS_STATE_BACKGROUND;
22 import static android.os.BatteryStats.Uid.PROCESS_STATE_CACHED;
23 import static android.os.BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE;
24 import static android.os.BatteryStats.Uid.PROCESS_STATE_TOP;
99 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStatsLocked(testUids[i]); in testUpdateProcStateCpuTimes()
110 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testUpdateProcStateCpuTimes()
137 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testUpdateProcStateCpuTimes()
169 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testUpdateProcStateCpuTimes()
208 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testUpdateProcStateCpuTimes()
[all …]
DBatteryStatsCpuTimesTest.java238 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testUpdateClusterSpeedTimes()
281 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked()
315 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked()
355 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked_isolatedUid()
390 BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked_isolatedUid()
446 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked_invalidUid()
495 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuTimesLocked_withPartialTimers()
513 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(partialTimerUids[i]); in testReadKernelUidCpuTimesLocked_withPartialTimers()
529 final BatteryStats.Uid.Proc proc = u.getProcessStats().get("*wakelock*"); in testReadKernelUidCpuTimesLocked_withPartialTimers()
572 final BatteryStats.Uid u = mBatteryStatsImpl.getUidStats().get(testUids[i]); in testReadKernelUidCpuFreqTimesLocked()
[all …]
DGnssPowerCalculatorTest.java49 BatteryStatsImpl.Uid uidStats = mStatsRule.getUidStats(APP_UID); in testTimerBasedModel()
81 BatteryStatsImpl.Uid uidStats = mStatsRule.getUidStats(APP_UID); in testMeasuredEnergyBasedModel()
85 BatteryStatsImpl.Uid uidStats2 = mStatsRule.getUidStats(APP_UID2); in testMeasuredEnergyBasedModel()
DPowerCalculatorTest.java57 BatteryStats.Uid u = mock(BatteryStats.Uid.class); in testMediaPowerCalculator()
DBatteryStatsNoteTest.java25 import android.os.BatteryStats.Uid.Sensor;
33 import com.android.internal.os.BatteryStatsImpl.Uid;
155 BatteryStats.Uid uid = bi.getUidStats().get(UID); in testNoteUidProcessStateLocked()
158 actualRunTimeUs = uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_TOP, elapsedTimeUs, in testNoteUidProcessStateLocked()
163 actualRunTimeUs = uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE, in testNoteUidProcessStateLocked()
168 actualRunTimeUs = uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_TOP_SLEEPING, in testNoteUidProcessStateLocked()
173 actualRunTimeUs = uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_FOREGROUND, in testNoteUidProcessStateLocked()
179 actualRunTimeUs = uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_BACKGROUND, in testNoteUidProcessStateLocked()
187 actualRunTimeUs = uid.getProcessStateTime(BatteryStats.Uid.PROCESS_STATE_CACHED, in testNoteUidProcessStateLocked()
393 Uid.Pkg pkg = bi.getPackageStatsLocked(UID, "com.foo.bar"); in testNoteWakupAlarmLocked()
[all …]
DUserPowerCalculatorTest.java114 BatteryStatsImpl.Uid uidStats = mStatsRule.getUidStats(UserHandle.getUid(userId, uid)); in prepareUidBatteryConsumer()
130 protected void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
139 protected void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
/frameworks/base/core/tests/batterystatstests/BatteryUsageStatsProtoTests/src/com/android/internal/os/
DBatteryUsageStatsPulledTest.java169 final BatteryStatsImpl.Uid batteryStatsUid0 = batteryStats.getUidStatsLocked(UID_0); in buildBatteryUsageStats()
170 final BatteryStatsImpl.Uid batteryStatsUid1 = batteryStats.getUidStatsLocked(UID_1); in buildBatteryUsageStats()
171 final BatteryStatsImpl.Uid batteryStatsUid2 = batteryStats.getUidStatsLocked(UID_2); in buildBatteryUsageStats()
172 final BatteryStatsImpl.Uid batteryStatsUid3 = batteryStats.getUidStatsLocked(UID_3); in buildBatteryUsageStats()
239 BatteryStatsImpl.Uid mockUid = mock(BatteryStatsImpl.Uid.class); in testLargeAtomTruncated()
250 BatteryStatsImpl.Uid largeConsumerMockUid = mock(BatteryStatsImpl.Uid.class); in testLargeAtomTruncated()
260 BatteryStatsImpl.Uid highUsageMockUid = mock(BatteryStatsImpl.Uid.class); in testLargeAtomTruncated()
/frameworks/base/core/java/android/os/
DBatteryStats.java638 return Uid.PROCESS_STATE_TOP; in mapToInternalProcessState()
641 return Uid.PROCESS_STATE_FOREGROUND_SERVICE; in mapToInternalProcessState()
644 return Uid.PROCESS_STATE_FOREGROUND; in mapToInternalProcessState()
646 return Uid.PROCESS_STATE_BACKGROUND; in mapToInternalProcessState()
648 return Uid.PROCESS_STATE_TOP_SLEEPING; in mapToInternalProcessState()
650 return Uid.PROCESS_STATE_HEAVY_WEIGHT; in mapToInternalProcessState()
652 return Uid.PROCESS_STATE_CACHED; in mapToInternalProcessState()
659 public static abstract class Uid { class in BatteryStats
662 public Uid() { in Uid() method in BatteryStats.Uid
905 Uid.PROCESS_STATE_TOP,
[all …]
DUidBatteryConsumer.java209 private final BatteryStats.Uid mBatteryStatsUid;
217 boolean includePowerModels, @NonNull BatteryStats.Uid batteryStatsUid) { in Builder()
231 public BatteryStats.Uid getBatteryStatsUid() { in getBatteryStatsUid()
/frameworks/base/tools/powermodel/test/com/android/powermodel/
DRawBatteryStatsTest.java73 final RawBatteryStats.Uid line = (RawBatteryStats.Uid)records.get(1); in testUid()

123