Home
last modified time | relevance | path

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

12

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DPowerStatsTest.java53 private PowerStats.DescriptorRegistry mRegistry;
54 private PowerStats.Descriptor mDescriptor;
58 mRegistry = new PowerStats.DescriptorRegistry(); in setup()
63 extras.putString(PowerStats.Descriptor.EXTRA_DEVICE_STATS_FORMAT, "device:0[3]"); in setup()
64 extras.putString(PowerStats.Descriptor.EXTRA_STATE_STATS_FORMAT, "state:0"); in setup()
65 extras.putString(PowerStats.Descriptor.EXTRA_UID_STATS_FORMAT, "a:0 b:1"); in setup()
66 mDescriptor = new PowerStats.Descriptor(BatteryConsumer.POWER_COMPONENT_CPU, 3, stateLabels, in setup()
73 PowerStats stats = new PowerStats(mDescriptor); in parceling_compatibleParcel()
90 PowerStats.Descriptor newDescriptor = in parceling_compatibleParcel()
91 PowerStats.Descriptor.readSummaryFromParcel(newParcel); in parceling_compatibleParcel()
[all …]
/frameworks/base/services/core/java/com/android/server/power/stats/
DPowerStatsCollector.java31 import com.android.internal.os.PowerStats;
65 private volatile List<Consumer<PowerStats>> mConsumerList = Collections.emptyList();
94 public void addConsumer(Consumer<PowerStats> consumer) { in addConsumer()
100 List<Consumer<PowerStats>> newList = new ArrayList<>(mConsumerList); in addConsumer()
111 public void removeConsumer(Consumer<PowerStats> consumer) { in removeConsumer()
113 List<Consumer<PowerStats>> newList = new ArrayList<>(mConsumerList); in removeConsumer()
136 PowerStats stats = collectStats(); in collectAndDeliverStats()
140 List<Consumer<PowerStats>> consumerList = mConsumerList; in collectAndDeliverStats()
179 protected abstract PowerStats collectStats(); in collectStats()
198 ArrayList<PowerStats> collected = new ArrayList<>(); in collectAndDump()
[all …]
DPhoneCallPowerStatsProcessor.java21 import com.android.internal.os.PowerStats;
25 private final PowerStats.Descriptor mDescriptor;
27 private PowerStats.Descriptor mMobileRadioStatsDescriptor;
36 mDescriptor = new PowerStats.Descriptor(BatteryConsumer.POWER_COMPONENT_PHONE, in PhoneCallPowerStatsProcessor()
DPowerStatsLayout.java22 import com.android.internal.os.PowerStats;
61 public PowerStatsLayout(PowerStats.Descriptor descriptor) { in PowerStatsLayout()
273 extras.putString(PowerStats.Descriptor.EXTRA_DEVICE_STATS_FORMAT, mDeviceFormat.toString()); in toExtras()
274 extras.putString(PowerStats.Descriptor.EXTRA_STATE_STATS_FORMAT, mStateFormat.toString()); in toExtras()
275 extras.putString(PowerStats.Descriptor.EXTRA_UID_STATS_FORMAT, mUidFormat.toString()); in toExtras()
DBinaryStatePowerStatsProcessor.java24 import com.android.internal.os.PowerStats;
53 private PowerStats.Descriptor mDescriptor;
55 private PowerStats mPowerStats;
76 mDescriptor = new PowerStats.Descriptor(mPowerComponentId, in ensureInitialized()
79 mPowerStats = new PowerStats(mDescriptor); in ensureInitialized()
143 void addPowerStats(PowerComponentAggregatedPowerStats stats, PowerStats powerStats, in addPowerStats()
DBluetoothPowerStatsCollector.java30 import com.android.internal.os.PowerStats;
72 private PowerStats mPowerStats;
143 PowerStats.Descriptor powerStatsDescriptor = new PowerStats.Descriptor( in ensureInitialized()
147 mPowerStats = new PowerStats(powerStatsDescriptor); in ensureInitialized()
155 protected PowerStats collectStats() { in collectStats()
DPowerComponentAggregatedPowerStats.java27 import com.android.internal.os.PowerStats;
68 private PowerStats.Descriptor mPowerStatsDescriptor;
103 public PowerStats.Descriptor getPowerStatsDescriptor() { in getPowerStatsDescriptor()
107 public void setPowerStatsDescriptor(PowerStats.Descriptor powerStatsDescriptor) { in setPowerStatsDescriptor()
177 boolean isCompatible(PowerStats powerStats) { in isCompatible()
181 void addPowerStats(PowerStats powerStats, long timestampMs) { in addPowerStats()
421 case PowerStats.Descriptor.XML_TAG_DESCRIPTOR: in readFromXml()
422 mPowerStatsDescriptor = PowerStats.Descriptor.createFromXml(parser); in readFromXml()
471 PowerStats.PowerStatsFormatter formatter = in dumpDevice()
493 PowerStats.PowerStatsFormatter statsFormatter) { in dumpMultiStateStats()
DWifiPowerStatsCollector.java30 import com.android.internal.os.PowerStats;
74 private PowerStats mPowerStats;
146 PowerStats.Descriptor powerStatsDescriptor = new PowerStats.Descriptor( in ensureInitialized()
150 mPowerStats = new PowerStats(powerStatsDescriptor); in ensureInitialized()
158 protected PowerStats collectStats() { in collectStats()
DCpuPowerStatsCollector.java33 import com.android.internal.os.PowerStats;
89 private PowerStats.Descriptor mPowerStatsDescriptor;
91 private PowerStats mCpuPowerStats;
147 mPowerStatsDescriptor = new PowerStats.Descriptor(BatteryConsumer.POWER_COMPONENT_CPU, in ensureInitialized()
150 mCpuPowerStats = new PowerStats(mPowerStatsDescriptor); in ensureInitialized()
329 public PowerStats.Descriptor getPowerStatsDescriptor() { in getPowerStatsDescriptor()
338 protected PowerStats collectStats() { in collectStats()
DMobileRadioPowerStatsCollector.java36 import com.android.internal.os.PowerStats;
91 private PowerStats mPowerStats;
181 PowerStats.Descriptor powerStatsDescriptor = new PowerStats.Descriptor( in ensureInitialized()
185 mPowerStats = new PowerStats(powerStatsDescriptor); in ensureInitialized()
193 protected PowerStats collectStats() { in collectStats()
DBluetoothPowerStatsLayout.java21 import com.android.internal.os.PowerStats;
43 BluetoothPowerStatsLayout(@NonNull PowerStats.Descriptor descriptor) { in BluetoothPowerStatsLayout()
DPowerStatsExporter.java25 import com.android.internal.os.PowerStats;
137 PowerStats.Descriptor descriptor = powerComponentStats.getPowerStatsDescriptor(); in populateBatteryUsageStatsBuilder()
179 PowerStats.Descriptor descriptor = powerComponentStats.getPowerStatsDescriptor(); in populateUidBatteryConsumers()
DAggregatedPowerStats.java29 import com.android.internal.os.PowerStats;
145 boolean isCompatible(PowerStats powerStats) { in isCompatible()
155 void addPowerStats(PowerStats powerStats, long time) { in addPowerStats()
DBluetoothPowerStatsProcessor.java20 import com.android.internal.os.PowerStats;
32 private PowerStats.Descriptor mLastUsedDescriptor;
139 private void unpackPowerStatsDescriptor(PowerStats.Descriptor descriptor) { in unpackPowerStatsDescriptor()
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DPowerStatsAggregatorTest.java34 import com.android.internal.os.PowerStats;
79 PowerStats.Descriptor descriptor = new PowerStats.Descriptor(TEST_POWER_COMPONENT, in stateUpdates()
81 PowerStats powerStats = new PowerStats(descriptor); in stateUpdates()
188 PowerStats.Descriptor descriptor = new PowerStats.Descriptor(TEST_POWER_COMPONENT, in incompatiblePowerStats()
190 PowerStats powerStats = new PowerStats(descriptor); in incompatiblePowerStats()
210 descriptor = new PowerStats.Descriptor(TEST_POWER_COMPONENT, "majorDrain", 1, null, 0, 1, in incompatiblePowerStats()
212 powerStats = new PowerStats(descriptor); in incompatiblePowerStats()
DPowerStatsCollectorTest.java41 import com.android.internal.os.PowerStats;
63 private PowerStats mCollectedStats;
72 protected PowerStats collectStats() { in setup()
73 return new PowerStats( in setup()
74 new PowerStats.Descriptor(0, 0, null, 0, 0, new PersistableBundle())); in setup()
DAggregatedPowerStatsTest.java29 import com.android.internal.os.PowerStats;
52 private PowerStats.Descriptor mPowerComponentDescriptor;
68 mPowerComponentDescriptor = new PowerStats.Descriptor(TEST_POWER_COMPONENT, "fan", 2, in setup()
100 PowerStats ps = new PowerStats(mPowerComponentDescriptor); in prepareAggregatePowerStats()
144 PowerStats.Descriptor descriptor = stats.getPowerComponentStats(TEST_POWER_COMPONENT) in verifyAggregatedPowerStats()
DWifiPowerStatsCollectorTest.java48 import com.android.internal.os.PowerStats;
122 private final List<PowerStats> mRecordedPowerStats = new ArrayList<>();
245 PowerStats powerStats = collectPowerStats(true); in collectStats_powerReportingSupported()
248 PowerStats.Descriptor descriptor = powerStats.descriptor; in collectStats_powerReportingSupported()
263 PowerStats powerStats = collectPowerStats(false); in collectStats_powerReportingUnsupported()
266 PowerStats.Descriptor descriptor = powerStats.descriptor; in collectStats_powerReportingUnsupported()
278 private void verifyUidStats(PowerStats powerStats) { in verifyUidStats()
304 PowerStats powerStats = collectPowerStats(true); in dump()
322 private PowerStats collectPowerStats(boolean hasPowerReporting) { in collectPowerStats()
DMobileRadioPowerStatsCollectorTest.java52 import com.android.internal.os.PowerStats;
106 private final List<PowerStats> mRecordedPowerStats = new ArrayList<>();
239 PowerStats powerStats = collectPowerStats(true); in collectStats()
242 PowerStats.Descriptor descriptor = powerStats.descriptor; in collectStats()
295 PowerStats powerStats = collectPowerStats(false); in collectStats_noPerNetworkTypeData()
298 PowerStats.Descriptor descriptor = powerStats.descriptor; in collectStats_noPerNetworkTypeData()
338 PowerStats powerStats = collectPowerStats(true); in dump()
355 private PowerStats collectPowerStats(boolean perNetworkTypeData) throws Throwable { in collectPowerStats()
DBinaryStatePowerStatsProcessorTest.java42 import com.android.internal.os.PowerStats;
154 PowerStats.Descriptor descriptor = new PowerStats.Descriptor(POWER_COMPONENT, in energyConsumerModel()
157 PowerStats powerStats = new PowerStats(descriptor); in energyConsumerModel()
DBluetoothPowerStatsCollectorTest.java39 import com.android.internal.os.PowerStats;
100 private final List<PowerStats> mRecordedPowerStats = new ArrayList<>();
190 PowerStats powerStats = collectPowerStats(); in collectStats()
218 PowerStats powerStats = collectPowerStats(); in dump()
231 private PowerStats collectPowerStats() { in collectPowerStats()
DPowerStatsExporterTest.java42 import com.android.internal.os.PowerStats;
81 private PowerStats.Descriptor mPowerStatsDescriptor;
115 mPowerStatsDescriptor = new PowerStats.Descriptor(BatteryConsumer.POWER_COMPONENT_CPU, in setup()
207 PowerStats powerStats = new PowerStats(mPowerStatsDescriptor); in recordBatteryHistory()
DCpuPowerStatsProcessorTest.java44 import com.android.internal.os.PowerStats;
202 private final PowerStats.Descriptor mDescriptor;
225 mDescriptor = new PowerStats.Descriptor(BatteryConsumer.POWER_COMPONENT_CPU, in MockPowerComponentAggregatedPowerStats()
231 public PowerStats.Descriptor getPowerStatsDescriptor() { in getPowerStatsDescriptor()
/frameworks/base/core/java/com/android/internal/os/
DBatteryStatsHistoryIterator.java42 private final PowerStats.DescriptorRegistry mDescriptorRegistry =
43 new PowerStats.DescriptorRegistry();
261 PowerStats.Descriptor descriptor = PowerStats.Descriptor.readSummaryFromParcel(src); in readHistoryDelta()
267 cur.powerStats = PowerStats.readFromParcel(src, mDescriptorRegistry); in readHistoryDelta()
DOWNERS13 per-file *PowerStats* = file:/BATTERY_STATS_OWNERS

12