/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | PowerStatsTest.java | 53 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/ |
D | PowerStatsCollector.java | 31 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 …]
|
D | PhoneCallPowerStatsProcessor.java | 21 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()
|
D | PowerStatsLayout.java | 22 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()
|
D | BinaryStatePowerStatsProcessor.java | 24 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()
|
D | BluetoothPowerStatsCollector.java | 30 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()
|
D | PowerComponentAggregatedPowerStats.java | 27 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()
|
D | WifiPowerStatsCollector.java | 30 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()
|
D | CpuPowerStatsCollector.java | 33 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()
|
D | MobileRadioPowerStatsCollector.java | 36 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()
|
D | BluetoothPowerStatsLayout.java | 21 import com.android.internal.os.PowerStats; 43 BluetoothPowerStatsLayout(@NonNull PowerStats.Descriptor descriptor) { in BluetoothPowerStatsLayout()
|
D | PowerStatsExporter.java | 25 import com.android.internal.os.PowerStats; 137 PowerStats.Descriptor descriptor = powerComponentStats.getPowerStatsDescriptor(); in populateBatteryUsageStatsBuilder() 179 PowerStats.Descriptor descriptor = powerComponentStats.getPowerStatsDescriptor(); in populateUidBatteryConsumers()
|
D | AggregatedPowerStats.java | 29 import com.android.internal.os.PowerStats; 145 boolean isCompatible(PowerStats powerStats) { in isCompatible() 155 void addPowerStats(PowerStats powerStats, long time) { in addPowerStats()
|
D | BluetoothPowerStatsProcessor.java | 20 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/ |
D | PowerStatsAggregatorTest.java | 34 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()
|
D | PowerStatsCollectorTest.java | 41 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()
|
D | AggregatedPowerStatsTest.java | 29 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()
|
D | WifiPowerStatsCollectorTest.java | 48 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()
|
D | MobileRadioPowerStatsCollectorTest.java | 52 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()
|
D | BinaryStatePowerStatsProcessorTest.java | 42 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()
|
D | BluetoothPowerStatsCollectorTest.java | 39 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()
|
D | PowerStatsExporterTest.java | 42 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()
|
D | CpuPowerStatsProcessorTest.java | 44 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/ |
D | BatteryStatsHistoryIterator.java | 42 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()
|
D | OWNERS | 13 per-file *PowerStats* = file:/BATTERY_STATS_OWNERS
|