Home
last modified time | relevance | path

Searched refs:buckets (Results 1 – 25 of 37) sorted by relevance

12

/frameworks/base/cmds/statsd/tests/metrics/
DMaxDurationTracker_test.cpp59 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() local
80 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, &buckets); in TEST()
81 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST()
82 EXPECT_EQ(1u, buckets[eventKey].size()); in TEST()
83 EXPECT_EQ(20LL, buckets[eventKey][0].mDuration); in TEST()
94 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() local
110 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 40, &buckets); in TEST()
113 EXPECT_TRUE(buckets.find(eventKey) == buckets.end()); in TEST()
115 tracker.flushIfNeeded(bucketStartTimeNs + 3 * bucketSizeNs + 40, &buckets); in TEST()
116 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST()
[all …]
DDurationMetricProducer_test.cpp86 const auto& buckets = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST() local
87 EXPECT_EQ(2UL, buckets.size()); in TEST()
88 EXPECT_EQ(bucketStartTimeNs, buckets[0].mBucketStartNs); in TEST()
89 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[0].mBucketEndNs); in TEST()
90 EXPECT_EQ(bucketSizeNs - 1LL, buckets[0].mDuration); in TEST()
91 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[1].mBucketStartNs); in TEST()
92 EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets[1].mBucketEndNs); in TEST()
93 EXPECT_EQ(2LL, buckets[1].mDuration); in TEST()
225 std::vector<DurationBucket> buckets = in TEST() local
227 EXPECT_EQ(bucketStartTimeNs, buckets[0].mBucketStartNs); in TEST()
[all …]
DOringDurationTracker_test.cpp57 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() local
75 tracker.flushIfNeeded(eventStartTimeNs + bucketSizeNs + 1, &buckets); in TEST()
76 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST()
78 EXPECT_EQ(1u, buckets[eventKey].size()); in TEST()
79 EXPECT_EQ(durationTimeNs, buckets[eventKey][0].mDuration); in TEST()
90 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() local
107 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, &buckets); in TEST()
108 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST()
109 EXPECT_EQ(1u, buckets[eventKey].size()); in TEST()
110 EXPECT_EQ(2003LL, buckets[eventKey][0].mDuration); in TEST()
[all …]
DCountMetricProducer_test.cpp87 const auto& buckets = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST() local
88 EXPECT_EQ(1UL, buckets.size()); in TEST()
89 EXPECT_EQ(bucketStartTimeNs, buckets[0].mBucketStartNs); in TEST()
90 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[0].mBucketEndNs); in TEST()
91 EXPECT_EQ(2LL, buckets[0].mCount); in TEST()
150 const auto& buckets = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST() local
151 EXPECT_EQ(1UL, buckets.size()); in TEST()
152 const auto& bucketInfo = buckets[0]; in TEST()
206 const auto& buckets = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST() local
207 EXPECT_EQ(1UL, buckets.size()); in TEST()
[all …]
/frameworks/native/services/stats/
DStatsHal.cpp58 std::vector<int32_t> buckets = chargeCycles.cycleBucket; in reportChargeCycles() local
59 int initialSize = buckets.size(); in reportChargeCycles()
61 buckets.push_back(-1); // Push -1 for buckets that do not exist. in reportChargeCycles()
63 android::util::stats_write(android::util::CHARGE_CYCLES_REPORTED, buckets[0], buckets[1], in reportChargeCycles()
64 buckets[2], buckets[3], buckets[4], buckets[5], buckets[6], buckets[7], buckets[8], in reportChargeCycles()
65 buckets[9]); in reportChargeCycles()
/frameworks/ex/common/tools/
Dmake-iana-tld-pattern.py124 def getBucket(buckets, line): argument
126 bucket = buckets.get(letter)
130 buckets[letter] = bucket
134 def makePattern(prefix, suffix, buckets, isWebUrl=False): argument
137 output += getBucket(buckets, 'a').dump(isFirst=True, isWebUrl=isWebUrl)
140 output += getBucket(buckets, chr(letter)).dump(isWebUrl=isWebUrl)
142 output += getBucket(buckets, 'z').dump(isLast=True, isWebUrl=isWebUrl)
158 buckets = {} variable
164 getBucket(buckets, domain[0]).add(domain.strip())
170 getBucket(buckets, 'xn--').add(result[2:-1])
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DScanTestUtil.java100 mSettings.buckets = new WifiNative.BucketSettings[0]; in NativeScanSettingsBuilder()
172 mSettings.buckets = Arrays.copyOf(mSettings.buckets, mSettings.num_buckets + 1); in addBucket()
173 mSettings.buckets[mSettings.num_buckets] = bucket; in addBucket()
378 assertNotNull("buckets was null", actual.buckets); in assertNativeScanSettingsEquals()
379 for (int i = 0; i < expected.buckets.length; ++i) { in assertNativeScanSettingsEquals()
380 assertNotNull("buckets[" + i + "] was null", actual.buckets[i]); in assertNativeScanSettingsEquals()
382 expected.buckets[i].period_ms, actual.buckets[i].period_ms); in assertNativeScanSettingsEquals()
384 expected.buckets[i].report_events, actual.buckets[i].report_events); in assertNativeScanSettingsEquals()
387 expected.buckets[i].band, actual.buckets[i].band); in assertNativeScanSettingsEquals()
388 if (expected.buckets[i].band == WifiScanner.WIFI_BAND_UNSPECIFIED) { in assertNativeScanSettingsEquals()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/
DBackgroundScanSchedulerTest.java482 assertBucketChannels(schedule.buckets[0], expectedBucketChannelSet); in optimalScheduleFullyCollapsesDuplicateChannelsInBand()
515 assertBucketChannels(schedule.buckets[0], expectedBucketChannelSet); in optimalScheduleFullyCollapsesDuplicateChannels()
548 assertBucketChannels(schedule.buckets[0], expectedBucketChannelSet); in optimalSchedulePartiallyCollapsesDuplicateChannels()
552 assertBucketChannels(schedule.buckets[1], expectedBucketChannelSet); in optimalSchedulePartiallyCollapsesDuplicateChannels()
587 assertBucketChannels(schedule.buckets[0], expectedBucketChannelSet); in optimalSchedulePartiallyCollapsesDuplicateChannelsAcrossMultipleBuckets()
591 assertBucketChannels(schedule.buckets[1], expectedBucketChannelSet); in optimalSchedulePartiallyCollapsesDuplicateChannelsAcrossMultipleBuckets()
599 assertBucketChannels(schedule.buckets[2], expectedBucketChannelSet); in optimalSchedulePartiallyCollapsesDuplicateChannelsAcrossMultipleBuckets()
636 assertBucketChannels(schedule.buckets[0], expectedBucketChannelSet); in optimalSchedulePartiallyCollapsesDuplicateChannelsWithSplitBuckets()
640 assertBucketChannels(schedule.buckets[1], expectedBucketChannelSet); in optimalSchedulePartiallyCollapsesDuplicateChannelsWithSplitBuckets()
649 Set<Integer> combinedBucketChannelSet = getAllChannels(schedule.buckets[2]); in optimalSchedulePartiallyCollapsesDuplicateChannelsWithSplitBuckets()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DKernelCpuThreadReader.java417 int[] buckets = new int[mNumBuckets]; in bucketValues() local
423 buckets[bucketIdx] += values[valuesIdx]; in bucketValues()
426 return buckets; in bucketValues()
433 int[] buckets = new int[mNumBuckets]; in bucketFrequencies() local
434 for (int i = 0; i < buckets.length; i++) { in bucketFrequencies()
435 buckets[i] = (int) frequencies[mBucketStartIndices[i]]; in bucketFrequencies()
437 return buckets; in bucketFrequencies()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/
DNetworkCycleChartData.java40 public Builder setUsageBuckets(List<NetworkCycleData> buckets) { in setUsageBuckets() argument
41 getObject().mUsageBuckets = buckets; in setUsageBuckets()
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/synthetic/
DTestInterface.java64 int buckets = runtimeSeconds * 1000; in TestInterface() local
65 mLinesLow = new float[buckets * 4]; in TestInterface()
66 mLinesHigh = new float[buckets * 4]; in TestInterface()
67 mLinesValue = new float[buckets * 4]; in TestInterface()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/
DScanScheduleUtil.java85 if (!bucketEquals(schedule1.buckets[b], schedule2.buckets[b])) { in scheduleEquals()
DBackgroundScanScheduler.java439 schedule.buckets = new WifiNative.BucketSettings[bucketList.size()]; in createSchedule()
447 schedule.buckets[bucketId] = in createSchedule()
471 int gcd = schedule.buckets[0].period_ms; in createSchedule()
473 gcd = Rational.gcd(schedule.buckets[b].period_ms, gcd); in createSchedule()
DWifiScanningServiceImpl.java883 WifiNative.BucketSettings activeBucket = mActiveScanSettings.buckets[0]; in activeScanSatisfies()
976 settings.buckets = new WifiNative.BucketSettings[] {bucketSettings}; in tryToStartNewScan()
1389 WifiNative.BucketSettings bucket = schedule.buckets[b]; in updateSchedule()
1408 WifiNative.BucketSettings bucket = schedule.buckets[b]; in updateSchedule()
2164 WifiNative.BucketSettings bucket = schedule.buckets[b]; in dump()
/frameworks/av/media/libnblog/
DPerformanceAnalysis.cpp355 std::map<double, int> buckets; in reportPerformance() local
359 buckets[logRound(ms, mBufferPeriod.mMean)] += countPair.second; in reportPerformance()
373 audio_utils_plot_histogram(buckets, title, kLabel, maxHeight).c_str()); in reportPerformance()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/aware/
DWifiAwareMetrics.java800 MetricsUtils.GenericBucket[] buckets) { in histogramToProtoArray() argument
802 new WifiMetricsProto.WifiAwareLog.HistogramBucket[buckets.length]; in histogramToProtoArray()
804 for (int i = 0; i < buckets.length; ++i) { in histogramToProtoArray()
806 protoArray[i].start = buckets[i].start; in histogramToProtoArray()
807 protoArray[i].end = buckets[i].end; in histogramToProtoArray()
808 protoArray[i].count = buckets[i].count; in histogramToProtoArray()
/frameworks/base/services/core/java/com/android/server/display/
DBrightnessTracker.java579 StringBuilder buckets = new StringBuilder(); in writeEventsLocked() local
582 buckets.append(','); in writeEventsLocked()
584 buckets.append(Long.toString(toWrite[i].colorValueBuckets[j])); in writeEventsLocked()
586 out.attribute(null, ATTR_COLOR_VALUE_BUCKETS, buckets.toString()); in writeEventsLocked()
681 String[] buckets = colorValueBucketsString.split(","); in readEventsLocked() local
682 long[] bucketValues = new long[buckets.length]; in readEventsLocked()
684 bucketValues[i] = Long.parseLong(buckets[i]); in readEventsLocked()
/frameworks/base/services/usage/java/com/android/server/usage/
DAppIdleHistory.java418 ArrayList<AppStandbyInfo> buckets = new ArrayList<>(size); in getAppStandbyBuckets() local
420 buckets.add(new AppStandbyInfo(userHistory.keyAt(i), in getAppStandbyBuckets()
423 return buckets; in getAppStandbyBuckets()
/frameworks/hardware/interfaces/stats/1.0/
DIStats.hal54 * @param chargeCycles A struct with battery charge cycle buckets.
Dtypes.hal95 * Each list of buckets represents the number of times
/frameworks/native/services/surfaceflinger/TimeStats/timestatsproto/
Dtimestats.proto73 // Histogram of the delta time. There should be at most 85 buckets ranging
/frameworks/base/core/proto/android/service/
Dnetstats.proto130 repeated NetworkStatsHistoryBucketProto buckets = 2; field
/frameworks/base/core/proto/android/telephony/
Denums.proto45 // Call setup duration buckets.
/frameworks/base/services/core/java/com/android/server/content/
DSyncManager.java1974 final SyncAdapterStateFetcher buckets = new SyncAdapterStateFetcher(); in dump() local
1976 dumpSyncState(ipw, buckets); in dump()
2038 protected void dumpPendingSyncs(PrintWriter pw, SyncAdapterStateFetcher buckets) { in dumpPendingSyncs() argument
2048 pw.println(op.dump(null, false, buckets, /*logSafe=*/ false)); in dumpPendingSyncs()
2055 protected void dumpPeriodicSyncs(PrintWriter pw, SyncAdapterStateFetcher buckets) { in dumpPeriodicSyncs() argument
2065 pw.println(op.dump(null, false, buckets, /*logSafe=*/ false)); in dumpPeriodicSyncs()
2122 protected void dumpSyncState(PrintWriter pw, SyncAdapterStateFetcher buckets) { in dumpSyncState() argument
2198 pw.print(activeSyncContext.mSyncOperation.dump(pm, false, buckets, /*logSafe=*/ false)); in dumpSyncState()
2203 dumpPendingSyncs(pw, buckets); in dumpSyncState()
2204 dumpPeriodicSyncs(pw, buckets); in dumpSyncState()
/frameworks/base/core/java/android/service/notification/
DZenModeConfig.java392 final int[] buckets = new int[maxHrs + 3]; in generateMinuteBuckets() local
393 buckets[0] = 15; in generateMinuteBuckets()
394 buckets[1] = 30; in generateMinuteBuckets()
395 buckets[2] = 45; in generateMinuteBuckets()
397 buckets[2 + i] = 60 * i; in generateMinuteBuckets()
399 return buckets; in generateMinuteBuckets()

12