/frameworks/layoutlib/bridge/src/android/util/imagepool/ |
D | ImagePoolHelper.java | 72 Bucket bucket, BucketCreationMetaData metaData, ImagePoolStats stats) { in getBufferedImage() argument 75 BufferedImage strongRef = populateBucket(bucket, metaData, stats); in getBufferedImage() 78 if (bucket.isEmpty()) { in getBufferedImage() 85 BufferedImage img = bucket.remove(); in getBufferedImage() 86 while (img == null && !bucket.isEmpty()) { in getBufferedImage() 87 img = bucket.remove(); in getBufferedImage() 90 if (img == null && bucket.isEmpty()) { in getBufferedImage() 92 return getBufferedImage(bucket, metaData, stats); in getBufferedImage() 105 Bucket bucket, BucketCreationMetaData metaData, ImagePoolStats stats) { in populateBucket() argument 106 if (!bucket.isEmpty()) { in populateBucket() [all …]
|
/frameworks/base/cmds/statsd/src/anomaly/ |
D | AnomalyTracker.cpp | 106 std::shared_ptr<DimToValMap>& bucket = mPastBuckets[bucketIndex]; in addPastBucket() local 107 auto itr = bucket->find(key); in addPastBucket() 108 if (itr != bucket->end()) { in addPastBucket() 113 bucket->insert({key, bucketValue}); in addPastBucket() 118 std::shared_ptr<DimToValMap> bucket = std::make_shared<DimToValMap>(); in addPastBucket() local 119 bucket->insert({key, bucketValue}); in addPastBucket() 120 addPastBucket(bucket, bucketNum); in addPastBucket() 124 void AnomalyTracker::addPastBucket(std::shared_ptr<DimToValMap> bucket, in addPastBucket() argument 139 mPastBuckets[index(bucketNum)] = bucket; in addPastBucket() 140 addBucketToSum(bucket); in addPastBucket() [all …]
|
/frameworks/base/tests/net/java/android/app/usage/ |
D | NetworkStatsManagerTest.java | 135 NetworkStats.Bucket bucket = new NetworkStats.Bucket(); in testQueryDetails() local 138 assertTrue(stats.getNextBucket(bucket)); in testQueryDetails() 139 assertEquals(10, bucket.getStartTimeStamp()); in testQueryDetails() 140 assertEquals(20, bucket.getEndTimeStamp()); in testQueryDetails() 141 assertBucketMatches(uid1Entry1, bucket); in testQueryDetails() 143 assertTrue(stats.getNextBucket(bucket)); in testQueryDetails() 144 assertEquals(20, bucket.getStartTimeStamp()); in testQueryDetails() 145 assertEquals(30, bucket.getEndTimeStamp()); in testQueryDetails() 146 assertBucketMatches(uid1Entry2, bucket); in testQueryDetails() 149 assertTrue(stats.getNextBucket(bucket)); in testQueryDetails() [all …]
|
/frameworks/layoutlib/bridge/tests/src/android/util/imagepool/ |
D | ImagePoolHelperTest.java | 38 Bucket bucket = new Bucket(); in testGetBufferedImage() local 44 assertNotNull(ImagePoolHelper.getBufferedImage(bucket, metaData, stats)); in testGetBufferedImage() 55 Bucket bucket = new Bucket(); in testGetBufferedImageRecurse() local 57 bucket.mBufferedImageRef.add(new SoftReference<>(null)); in testGetBufferedImageRecurse() 64 assertNotNull(ImagePoolHelper.getBufferedImage(bucket, metaData, stats)); in testGetBufferedImageRecurse() 75 Bucket bucket = new Bucket(); in testRecurseThenHitCacheLimit() local 77 bucket.mBufferedImageRef.add(new SoftReference<>(null)); in testRecurseThenHitCacheLimit() 84 assertNull(ImagePoolHelper.getBufferedImage(bucket, metaData, stats)); in testRecurseThenHitCacheLimit() 96 Bucket bucket = new Bucket(); in testBucketHasImageToReturn() local 98 bucket.mBufferedImageRef.add(new SoftReference<>(null)); in testBucketHasImageToReturn() [all …]
|
/frameworks/base/cmds/statsd/tests/ |
D | statsd_test_util.h | 277 const int64_t timeBaseNs, const int64_t bucketSizeNs, T* bucket) { in backfillStartEndTimestampForFullBucket() argument 278 bucket->set_start_bucket_elapsed_nanos(timeBaseNs + bucketSizeNs * bucket->bucket_num()); in backfillStartEndTimestampForFullBucket() 279 bucket->set_end_bucket_elapsed_nanos( in backfillStartEndTimestampForFullBucket() 280 timeBaseNs + bucketSizeNs * bucket->bucket_num() + bucketSizeNs); in backfillStartEndTimestampForFullBucket() 281 bucket->clear_bucket_num(); in backfillStartEndTimestampForFullBucket() 285 void backfillStartEndTimestampForPartialBucket(const int64_t timeBaseNs, T* bucket) { in backfillStartEndTimestampForPartialBucket() argument 286 if (bucket->has_start_bucket_elapsed_millis()) { in backfillStartEndTimestampForPartialBucket() 287 bucket->set_start_bucket_elapsed_nanos( in backfillStartEndTimestampForPartialBucket() 288 MillisToNano(bucket->start_bucket_elapsed_millis())); in backfillStartEndTimestampForPartialBucket() 289 bucket->clear_start_bucket_elapsed_millis(); in backfillStartEndTimestampForPartialBucket() [all …]
|
/frameworks/base/libs/androidfw/include/androidfw/ |
D | ByteBucketArray.h | 55 T* bucket = buckets_[bucket_index]; variable 56 if (bucket == NULL) { 59 return bucket[0x0f & static_cast<uint8_t>(index)]; 67 T* bucket = buckets_[bucket_index]; in editItemAt() local 68 if (bucket == NULL) { in editItemAt() 69 bucket = buckets_[bucket_index] = new T[kBucketSize](); in editItemAt() 71 return bucket[0x0f & static_cast<uint8_t>(index)]; in editItemAt()
|
/frameworks/compile/mclinker/include/mcld/ADT/ |
D | HashBase.tcc | 128 bucket_type& bucket = m_Buckets[index]; in lookUpBucketFor() local 130 if (bucket_type::getEmptyBucket() == bucket.Entry) { in lookUpBucketFor() 136 bucket.FullHashValue = full_hash; in lookUpBucketFor() 140 if (bucket_type::getTombstone() == bucket.Entry) { in lookUpBucketFor() 144 } else if (bucket.FullHashValue == full_hash) { in lookUpBucketFor() 145 if (bucket.Entry->compare(pKey)) { in lookUpBucketFor() 169 bucket_type& bucket = m_Buckets[index]; in findKey() local 171 if (bucket_type::getEmptyBucket() == bucket.Entry) in findKey() 174 if (bucket_type::getTombstone() == bucket.Entry) { in findKey() 176 } else if (full_hash == bucket.FullHashValue) { in findKey() [all …]
|
D | HashTable.tcc | 68 bucket_type& bucket = BaseTy::m_Buckets[index]; in insert() local 69 entry_type* entry = bucket.Entry; in insert() 81 entry = bucket.Entry = m_EntryFactory.produce(pKey); in insert() 102 bucket_type& bucket = BaseTy::m_Buckets[index]; in erase() local 103 m_EntryFactory.destroy(bucket.Entry); in erase() 104 bucket.Entry = bucket_type::getTombstone(); in erase() 148 const_chain_iterator bucket, bEnd = end(pKey); in count() local 150 for (bucket = begin(pKey); bucket != bEnd; ++bucket) in count()
|
D | HashIterator.h | 37 bucket_type& bucket = m_pHashTable->m_Buckets[m_Index]; in ChainIteratorBase() local 38 if (bucket_type::getTombstone() == bucket.Entry) { in ChainIteratorBase() 40 } else if (m_HashValue == bucket.FullHashValue) { in ChainIteratorBase() 41 if (bucket.Entry->compare(pKey)) { in ChainIteratorBase() 116 bucket_type& bucket = m_pHashTable->m_Buckets[m_Index]; in advance() local 118 if (bucket_type::getTombstone() == bucket.Entry || in advance() 119 bucket_type::getEmptyBucket() == bucket.Entry) { in advance() 121 } else if (m_HashValue == bucket.FullHashValue) { in advance()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/ |
D | NetworkCycleChartDataLoader.java | 46 final NetworkStats.Bucket bucket = mNetworkStatsManager.querySummaryForDevice( in recordUsage() local 48 final long total = bucket == null ? 0L : bucket.getRxBytes() + bucket.getTxBytes(); in recordUsage() 83 final NetworkStats.Bucket bucket = mNetworkStatsManager.querySummaryForDevice( 85 if (bucket != null) { 86 usage = bucket.getRxBytes() + bucket.getTxBytes();
|
D | DataUsageController.java | 172 final Bucket bucket = mNetworkStatsManager.querySummaryForDevice(template, start, end); in getUsageLevel() local 173 if (bucket != null) { in getUsageLevel() 174 return bucket.getRxBytes() + bucket.getTxBytes(); in getUsageLevel() 197 private static String statsBucketToString(Bucket bucket) { in statsBucketToString() argument 198 return bucket == null ? null : new StringBuilder("Entry[") in statsBucketToString() 199 .append("bucketDuration=").append(bucket.getEndTimeStamp() - bucket.getStartTimeStamp()) in statsBucketToString() 200 .append(",bucketStart=").append(bucket.getStartTimeStamp()) in statsBucketToString() 201 .append(",rxBytes=").append(bucket.getRxBytes()) in statsBucketToString() 202 .append(",rxPackets=").append(bucket.getRxPackets()) in statsBucketToString() 203 .append(",txBytes=").append(bucket.getTxBytes()) in statsBucketToString() [all …]
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | MetricsUtils.java | 149 int bucket = 0; in addValueToLinearHistogram() local 152 bucket++; in addValueToLinearHistogram() 159 int newValue = histogram.get(bucket) + 1; in addValueToLinearHistogram() 160 histogram.put(bucket, newValue); in addValueToLinearHistogram() 173 int bucket = histogram.keyAt(i); in linearHistogramToGenericBuckets() local 176 if (bucket == 0) { in linearHistogramToGenericBuckets() 179 } else if (bucket != linearHistParams.length) { in linearHistogramToGenericBuckets() 180 protoArray[i].start = linearHistParams[bucket - 1]; in linearHistogramToGenericBuckets() 181 protoArray[i].end = linearHistParams[bucket]; in linearHistogramToGenericBuckets()
|
D | IntHistogram.java | 204 Bucket bucket = getBucketByIndex(mBucketIndex); in iterator() local 206 return bucket; in iterator() 240 for (Bucket bucket : this) { in toProto() 241 output[i] = converter.convert(bucket.start, bucket.end, bucket.count); in toProto()
|
/frameworks/base/core/java/com/android/internal/app/procstats/ |
D | SysMemUsageTable.java | 149 final int bucket = ((iscreen + imem) * STATE_COUNT); in dump() local 150 long count = getValueForId((byte)bucket, SYS_MEM_USAGE_SAMPLE_COUNT); in dump() 166 dumpCategory(pw, prefix, " Cached", bucket, SYS_MEM_USAGE_CACHED_MINIMUM); in dump() 167 dumpCategory(pw, prefix, " Free", bucket, SYS_MEM_USAGE_FREE_MINIMUM); in dump() 168 dumpCategory(pw, prefix, " ZRam", bucket, SYS_MEM_USAGE_ZRAM_MINIMUM); in dump() 169 dumpCategory(pw, prefix, " Kernel", bucket, SYS_MEM_USAGE_KERNEL_MINIMUM); in dump() 170 dumpCategory(pw, prefix, " Native", bucket, SYS_MEM_USAGE_NATIVE_MINIMUM); in dump() 176 private void dumpCategory(PrintWriter pw, String prefix, String label, int bucket, int index) { in dumpCategory() argument 179 DebugUtils.printSizeValue(pw, getValueForId((byte)bucket, index) * 1024); in dumpCategory() 181 DebugUtils.printSizeValue(pw, getValueForId((byte)bucket, index + 1) * 1024); in dumpCategory() [all …]
|
/frameworks/rs/ |
D | rsMap.h | 40 for (size_t i = 0; i < MAP_NUM_BUCKET; i++) { bucket[i] = nullptr; } in Map() 45 LinkNode* p = bucket[i]; in ~Map() 57 LinkNode* node = bucket[index]; 72 bucket[index] = node; 92 next = map->bucket[bucket_index]; 128 LinkNode* node = bucket[i]; in begin() 145 LinkNode* node = bucket[index]; in find() 160 LinkNode* bucket[MAP_NUM_BUCKET]; variable
|
/frameworks/base/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/ |
D | ConfigFactory.java | 95 public ConfigMetadata getConfig(int replication, TimeUnit bucket, boolean placebo, in getConfig() argument 114 addCountMetric(metric, i, bucket, config); in getConfig() 120 addDurationMetric(metric, i, bucket, config); in getConfig() 126 addGaugeMetric(metric, i, bucket, config); in getConfig() 132 addValueMetric(metric, i, bucket, config); in getConfig() 190 private void addCountMetric(CountMetric template, int suffix, TimeUnit bucket, in addCountMetric() argument 203 metric.setBucket(bucket); in addCountMetric() 211 private void addDurationMetric(DurationMetric template, int suffix, TimeUnit bucket, in addDurationMetric() argument 224 metric.setBucket(bucket); in addDurationMetric() 232 private void addGaugeMetric(GaugeMetric template, int suffix, TimeUnit bucket, in addGaugeMetric() argument [all …]
|
D | PerfData.java | 57 TimeUnit bucket, long periodSecs, int burst, boolean includeCountMetric, in PerfData() argument 60 super(placebo, replication, bucket, periodSecs, burst, includeCountMetric, in PerfData() 63 mRecorders.add(new BatteryDataRecorder(placebo, replication, bucket, periodSecs, burst, in PerfData() 66 mRecorders.add(new MemoryDataRecorder(placebo, replication, bucket, periodSecs, burst, in PerfData() 69 mRecorders.add(new StatsdStatsRecorder(loadtestActivity, placebo, replication, bucket, in PerfData() 72 mRecorders.add(new ValidationRecorder(loadtestActivity, placebo, replication, bucket, in PerfData()
|
/frameworks/base/cmds/statsd/src/metrics/ |
D | ValueMetricProducer.cpp | 111 bucketSizeMills = TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()); in ValueMetricProducer() 291 for (const auto& bucket : pair.second) { in onDumpReportLocked() local 295 if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) { in onDumpReportLocked() 297 (long long)NanoToMillis(bucket.mBucketStartNs)); in onDumpReportLocked() 299 (long long)NanoToMillis(bucket.mBucketEndNs)); in onDumpReportLocked() 302 (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs))); in onDumpReportLocked() 307 (long long)bucket.mConditionTrueNs); in onDumpReportLocked() 309 for (int i = 0; i < (int)bucket.valueIndex.size(); i ++) { in onDumpReportLocked() 310 int index = bucket.valueIndex[i]; in onDumpReportLocked() 311 const Value& value = bucket.values[i]; in onDumpReportLocked() [all …]
|
D | CountMetricProducer.cpp | 75 TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()) * 1000000; in CountMetricProducer() 216 for (const auto& bucket : counter.second) { in onDumpReportLocked() local 220 if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) { in onDumpReportLocked() 222 (long long)NanoToMillis(bucket.mBucketStartNs)); in onDumpReportLocked() 224 (long long)NanoToMillis(bucket.mBucketEndNs)); in onDumpReportLocked() 227 (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs))); in onDumpReportLocked() 229 protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_COUNT, (long long)bucket.mCount); in onDumpReportLocked() 231 VLOG("\t bucket [%lld - %lld] count: %lld", (long long)bucket.mBucketStartNs, in onDumpReportLocked() 232 (long long)bucket.mBucketEndNs, (long long)bucket.mCount); in onDumpReportLocked()
|
D | GaugeMetricProducer.cpp | 100 bucketSizeMills = TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()); in GaugeMetricProducer() 262 for (const auto& bucket : pair.second) { in onDumpReportLocked() local 266 if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) { in onDumpReportLocked() 268 (long long)NanoToMillis(bucket.mBucketStartNs)); in onDumpReportLocked() 270 (long long)NanoToMillis(bucket.mBucketEndNs)); in onDumpReportLocked() 273 (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs))); in onDumpReportLocked() 276 if (!bucket.mGaugeAtoms.empty()) { in onDumpReportLocked() 277 for (const auto& atom : bucket.mGaugeAtoms) { in onDumpReportLocked() 284 for (const auto& atom : bucket.mGaugeAtoms) { in onDumpReportLocked() 294 (long long)bucket.mBucketStartNs, (long long)bucket.mBucketEndNs, in onDumpReportLocked() [all …]
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/ |
D | MetricsCollector.java | 98 private static long round(long value, long bucket) { in round() argument 99 return ((value + bucket / 2) / bucket) * bucket; in round()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | ScanTestUtil.java | 142 WifiNative.BucketSettings bucket = new WifiNative.BucketSettings(); in addBucketWithBand() local 143 bucket.bucket = mSettings.num_buckets; in addBucketWithBand() 144 bucket.band = band; in addBucketWithBand() 145 bucket.period_ms = period; in addBucketWithBand() 146 bucket.report_events = reportEvents; in addBucketWithBand() 147 return addBucket(bucket); in addBucketWithBand() 161 WifiNative.BucketSettings bucket = new WifiNative.BucketSettings(); in addBucketWithChannels() local 162 bucket.bucket = mSettings.num_buckets; in addBucketWithChannels() 163 bucket.band = WifiScanner.WIFI_BAND_UNSPECIFIED; in addBucketWithChannels() 164 bucket.num_channels = channels.length; in addBucketWithChannels() [all …]
|
/frameworks/native/libs/cputimeinstate/ |
D | cputimeinstate.cpp | 252 key.bucket = i; in getUidCpuFreqTimes() 324 auto offset = key.bucket * FREQS_PER_ENTRY; in getUidsUpdatedCpuFreqTimes() 325 auto nextOffset = (key.bucket + 1) * FREQS_PER_ENTRY; in getUidsUpdatedCpuFreqTimes() 363 for (key.bucket = 0; key.bucket <= (gNCpus - 1) / CPUS_PER_ENTRY; ++key.bucket) { in getUidConcurrentTimes() 368 auto offset = key.bucket * CPUS_PER_ENTRY; in getUidConcurrentTimes() 369 auto nextOffset = (key.bucket + 1) * CPUS_PER_ENTRY; in getUidConcurrentTimes() 436 auto offset = key.bucket * CPUS_PER_ENTRY; in getUidsUpdatedConcurrentTimes() 437 auto nextOffset = (key.bucket + 1) * CPUS_PER_ENTRY; in getUidsUpdatedConcurrentTimes() 486 for (key.bucket = 0; key.bucket <= (maxFreqCount - 1) / FREQS_PER_ENTRY; ++key.bucket) { in clearUidTimes() 494 for (key.bucket = 0; key.bucket <= (gNCpus - 1) / CPUS_PER_ENTRY; ++key.bucket) { in clearUidTimes()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/ |
D | BackgroundScanSchedulerTest.java | 654 protected Set<Integer> getAllChannels(BucketSettings bucket) { in getAllChannels() argument 656 collection.addChannels(bucket); in getAllChannels() 733 BucketSettings bucket = schedule.buckets[b]; in assertSettingsSatisfied() local 735 if ((bucket.report_events & WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN) == 0) { in assertSettingsSatisfied() 738 .append(getAllChannels(bucket)) in assertSettingsSatisfied() 740 .append(bucket.report_events & WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN) in assertSettingsSatisfied() 748 if ((bucket.report_events & WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT) == 0) { in assertSettingsSatisfied() 751 .append(getAllChannels(bucket)) in assertSettingsSatisfied() 753 .append(bucket.report_events in assertSettingsSatisfied() 762 if ((bucket.report_events & WifiScanner.REPORT_EVENT_NO_BATCH) != 0) { in assertSettingsSatisfied() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/ |
D | BatteryStateSnapshot.kt | 13 val bucket: Int, constant in com.android.systemui.power.BatteryStateSnapshot 38 bucket: Int, 46 bucket,
|