Home
last modified time | relevance | path

Searched refs:bucketSizeNs (Results 1 – 25 of 38) sorted by relevance

12

/packages/modules/StatsD/statsd/tests/e2e/
DGaugeMetric_e2e_pull_test.cpp74 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.gauge_metric(0).bucket()) * 1000000; in TEST() local
92 EXPECT_EQ(bucketSizeNs, in TEST()
96 EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + bucketSizeNs, nextPullTimeNs); in TEST()
104 EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 2 * bucketSizeNs, nextPullTimeNs); in TEST()
106 auto screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + bucketSizeNs + 10, in TEST()
110 screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + bucketSizeNs + 100, in TEST()
115 EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 3 * bucketSizeNs, nextPullTimeNs); in TEST()
118 EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 4 * bucketSizeNs, nextPullTimeNs); in TEST()
120 screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 3 * bucketSizeNs + 2, in TEST()
125 EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 5 * bucketSizeNs, nextPullTimeNs); in TEST()
[all …]
DAttribution_e2e_test.cpp99 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000; in TEST() local
120 events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs - 1, in TEST()
122 events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs, attributionUids4, in TEST()
126 events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs + 1, in TEST()
128 events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs + 100, in TEST()
130 events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs - 2, in TEST()
132 events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs, in TEST()
134 events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs + 1, in TEST()
136 events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + 3 * bucketSizeNs + 100, in TEST()
138 events.push_back(CreateIsolatedUidChangedEvent(bucketStartTimeNs + 3 * bucketSizeNs - 1, 222, in TEST()
[all …]
DValueMetric_pull_e2e_test.cpp157 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.value_metric(0).bucket()) * 1000000; in TEST() local
207 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.value_metric(0).bucket()) * 1000000; in TEST() local
225 EXPECT_EQ(bucketSizeNs, in TEST()
229 EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + bucketSizeNs, expectedPullTimeNs); in TEST()
245 EXPECT_EQ(baseTimeNs + startBucketNum * bucketSizeNs + 2 * bucketSizeNs, expectedPullTimeNs); in TEST()
249 screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 2 * bucketSizeNs + 15, in TEST()
257 screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 4 * bucketSizeNs + 11, in TEST()
267 processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true, in TEST()
290 EXPECT_EQ(baseTimeNs + 3 * bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos()); in TEST()
291 EXPECT_EQ(baseTimeNs + 4 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos()); in TEST()
[all …]
DAnomaly_duration_sum_e2e_test.cpp118 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.duration_metric(0).bucket()) * 1e6; in TEST_F() local
193 roundedBucketStartTimeNs + bucketSizeNs - 5 * NS_PER_SEC - 11, attributionUids2, in TEST_F()
197 EXPECT_EQ((bucketStartTimeNs + bucketSizeNs - 5 * NS_PER_SEC) / NS_PER_SEC, in TEST_F()
201 int64_t release_event_time = roundedBucketStartTimeNs + bucketSizeNs - 4 * NS_PER_SEC - 10; in TEST_F()
214 acquire_event = CreateAcquireWakelockEvent(roundedBucketStartTimeNs + bucketSizeNs - 2, in TEST_F()
217 EXPECT_EQ((bucketStartTimeNs + bucketSizeNs) / NS_PER_SEC, in TEST_F()
221 release_event_time = roundedBucketStartTimeNs + bucketSizeNs + NS_PER_SEC - 1; in TEST_F()
227 EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs + NS_PER_SEC) / NS_PER_SEC, in TEST_F()
232 CreateScreenStateChangedEvent(bucketStartTimeNs + 2 * bucketSizeNs + 20, in TEST_F()
235 EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs + NS_PER_SEC) / NS_PER_SEC, in TEST_F()
[all …]
DWakelockDuration_e2e_test.cpp77 uint64_t bucketSizeNs = in FeedEvents() local
85 CreateScreenStateChangedEvent(bucketStartTimeNs + bucketSizeNs + 500, in FeedEvents()
90 auto releaseEvent1 = CreateReleaseWakelockEvent(bucketStartTimeNs + bucketSizeNs + 2, in FeedEvents()
92 auto acquireEvent2 = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs - 10, in FeedEvents()
94 auto releaseEvent2 = CreateReleaseWakelockEvent(bucketStartTimeNs + 2 * bucketSizeNs - 15, in FeedEvents()
120 uint64_t bucketSizeNs = in TEST() local
128 processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs - 1, false, true, ADB_DUMP, in TEST()
150 EXPECT_EQ((unsigned long long)data.bucket_info(0).duration_nanos(), bucketSizeNs - 200); in TEST()
157 uint64_t bucketSizeNs = in TEST() local
165 processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true, ADB_DUMP, in TEST()
[all …]
DMetricConditionLink_e2e_test.cpp104 uint64_t bucketSizeNs = in TEST() local
115 auto crashEvent3 = CreateAppCrashEvent(bucketStartTimeNs + 2 * bucketSizeNs - 101, appUid); in TEST()
118 auto crashEvent5 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 299, appUid); in TEST()
119 auto crashEvent6 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 2001, appUid); in TEST()
122 auto crashEvent8 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 249, appUid); in TEST()
124 auto crashEvent9 = CreateAppCrashEvent(bucketStartTimeNs + bucketSizeNs + 351, appUid); in TEST()
125 auto crashEvent10 = CreateAppCrashEvent(bucketStartTimeNs + 2 * bucketSizeNs - 2, appUid); in TEST()
132 CreateScreenStateChangedEvent(bucketStartTimeNs + 2 * bucketSizeNs - 100, in TEST()
140 auto syncOffEvent1 = CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs + 300, attributionUids, in TEST()
142 auto syncOnEvent2 = CreateSyncStartEvent(bucketStartTimeNs + bucketSizeNs + 2000, in TEST()
[all …]
DGaugeMetric_e2e_push_test.cpp132 int64_t bucketSizeNs = in TEST_F() local
146 CreateMoveToForegroundEvent(bucketStartTimeNs + bucketSizeNs + 250, appUid1)); in TEST_F()
148 CreateMoveToBackgroundEvent(bucketStartTimeNs + bucketSizeNs + 350, appUid1)); in TEST_F()
150 CreateMoveToForegroundEvent(bucketStartTimeNs + 2 * bucketSizeNs + 100, appUid1)); in TEST_F()
162 bucketStartTimeNs + bucketSizeNs + 30, appUid1, "app1", AppStartOccurred::WARM, in TEST_F()
166 bucketStartTimeNs + 2 * bucketSizeNs, appUid1, "app1", AppStartOccurred::COLD, in TEST_F()
170 bucketStartTimeNs + 2 * bucketSizeNs + 10, appUid1, "app1", AppStartOccurred::HOT, in TEST_F()
175 CreateMoveToBackgroundEvent(bucketStartTimeNs + bucketSizeNs + 10, appUid2)); in TEST_F()
177 bucketStartTimeNs + 2 * bucketSizeNs + 10, appUid2, "app2", AppStartOccurred::COLD, in TEST_F()
188 processor->onDumpReport(cfgKey, bucketStartTimeNs + 3 * bucketSizeNs, false, true, ADB_DUMP, in TEST_F()
[all …]
DAnomaly_count_e2e_test.cpp64 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000; in TEST() local
139 event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs - 1, attributionUids1, in TEST()
142 EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs - 1) / NS_PER_SEC + 1, in TEST()
145 event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 1, attributionUids1, in TEST()
148 EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs - 1) / NS_PER_SEC + 1, in TEST()
151 event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 1, attributionUids4, in TEST()
156 event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 2, attributionUids5, in TEST()
161 event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 3, attributionUids5, in TEST()
166 event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 4, attributionUids5, in TEST()
169 EXPECT_EQ(refractory_period_sec + (bucketStartTimeNs + bucketSizeNs + 4) / NS_PER_SEC + 1, in TEST()
[all …]
DKllMetric_e2e_test.cpp48 bucketSizeNs = TimeUnitToBucketSizeInMillis(TEN_MINUTES) * 1000000LL; in SetUp()
65 uint64_t bucketSizeNs; member in android::os::statsd::KllMetricE2eTest
80 uint64_t dumpTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST_F()
102 EXPECT_EQ(bucket.end_bucket_elapsed_nanos(), bucketStartTimeNs + bucketSizeNs); in TEST_F()
133 uint64_t dumpTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST_F()
155 EXPECT_EQ(bucket.end_bucket_elapsed_nanos(), bucketStartTimeNs + bucketSizeNs); in TEST_F()
167 EXPECT_EQ(bucket.end_bucket_elapsed_nanos(), bucketStartTimeNs + bucketSizeNs); in TEST_F()
262 processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs + 1, false, true, ADB_DUMP, in TEST_F()
285 ValidateKllBucket(data.bucket_info(0), bucketStartTimeNs, bucketStartTimeNs + bucketSizeNs, {2}, in TEST_F()
291 ValidateKllBucket(data.bucket_info(0), bucketStartTimeNs, bucketStartTimeNs + bucketSizeNs, {2}, in TEST_F()
DCountMetric_e2e_test.cpp78 const uint64_t bucketSizeNs = in TEST() local
145 const uint64_t bucketSizeNs = in TEST() local
147 const uint64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
148 const uint64_t bucket3StartTimeNs = bucket2StartTimeNs + bucketSizeNs; in TEST()
302 const uint64_t bucketSizeNs = in TEST() local
375 processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs * 2 + 1, false, true, ADB_DUMP, in TEST()
452 const uint64_t bucketSizeNs = in TEST() local
557 processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs * 2 + 1, false, true, ADB_DUMP, in TEST()
637 const uint64_t bucketSizeNs = in TEST() local
738 processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs * 2 + 1, false, true, ADB_DUMP, in TEST()
[all …]
DConfigTtl_e2e_test.cpp66 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.count_metric(0).bucket()) * 1000000; in TEST() local
90 event = CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + 2, attributionUids1, in TEST()
94 event = CreateAcquireWakelockEvent(bucketStartTimeNs + 25 * bucketSizeNs + 2, attributionUids1, in TEST()
98 EXPECT_EQ((int64_t)(bucketStartTimeNs + 25 * bucketSizeNs + 2 + 2 * 3600 * NS_PER_SEC), in TEST()
103 processor->onDumpReport(cfgKey, bucketStartTimeNs + 25 * bucketSizeNs + 3, false, true, in TEST()
DStringReplace_e2e_test.cpp82 const uint64_t bucketSizeNs = in TEST() local
113 processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs + 1, false, true, ADB_DUMP, in TEST()
179 const uint64_t bucketSizeNs = in TEST() local
210 processor->onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs + 1, false, true, ADB_DUMP, in TEST()
259 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.gauge_metric(0).bucket()) * 1000000; in TEST() local
268 processor->informPullAlarmFired(baseTimeNs + 2 * bucketSizeNs + 1); in TEST()
272 processor->onDumpReport(cfgKey, configAddedTimeNs + 3 * bucketSizeNs + 10, false, true, in TEST()
322 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(config.gauge_metric(0).bucket()) * 1000000; in TEST() local
335 processor->informPullAlarmFired(baseTimeNs + 2 * bucketSizeNs + 1); in TEST()
339 processor->onDumpReport(cfgKey, configAddedTimeNs + 3 * bucketSizeNs + 10, false, true, in TEST()
[all …]
DDurationMetric_e2e_test.cpp50 const int64_t bucketSizeNs = in TEST() local
89 processor->onDumpReport(cfgKey, configAddedTimeNs + bucketSizeNs + 1 * NS_PER_SEC, false, true, in TEST()
110 EXPECT_EQ(baseTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos()); in TEST()
133 const int64_t bucketSizeNs = in TEST() local
172 processor->onDumpReport(cfgKey, configAddedTimeNs + 2 * bucketSizeNs + 1 * NS_PER_SEC, false, in TEST()
195 EXPECT_EQ(baseTimeNs + bucketSizeNs, bucketInfo.end_bucket_elapsed_nanos()); in TEST()
225 const int64_t bucketSizeNs = in TEST() local
350 processor.onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs + 1 * NS_PER_SEC, false, true, in TEST()
398 uint64_t bucketSizeNs = in TEST() local
417 int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
[all …]
DConfigUpdate_e2e_test.cpp358 uint64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(TEN_MINUTES) * 1000000LL; in TEST_F() local
446 events.push_back(CreateAcquireWakelockEvent(bucketStartTimeNs + bucketSizeNs + NS_PER_SEC, in TEST_F()
452 uint64_t dumpTimeNs = bucketStartTimeNs + bucketSizeNs + 10 * NS_PER_SEC; in TEST_F()
514 ValidateCountBucket(data.bucket_info(0), updateTimeNs, bucketStartTimeNs + bucketSizeNs, 1, in TEST_F()
524 ValidateCountBucket(data.bucket_info(0), updateTimeNs, bucketStartTimeNs + bucketSizeNs, 1, in TEST_F()
526 ValidateCountBucket(data.bucket_info(1), bucketStartTimeNs + bucketSizeNs, dumpTimeNs, 1, in TEST_F()
541 ValidateCountBucket(data.bucket_info(0), updateTimeNs, bucketStartTimeNs + bucketSizeNs, 1); in TEST_F()
548 ValidateCountBucket(data.bucket_info(0), updateTimeNs, bucketStartTimeNs + bucketSizeNs, 2); in TEST_F()
629 uint64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(TEN_MINUTES) * 1000000LL; in TEST_F() local
733 events.push_back(CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs + NS_PER_SEC, in TEST_F()
[all …]
DMetricActivation_e2e_test.cpp235 int64_t bucketSizeNs = in TEST() local
410 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos()); in TEST()
421 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos()); in TEST()
432 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos()); in TEST()
444 EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, in TEST()
446 EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos()); in TEST()
453 int64_t bucketSizeNs = in TEST() local
724 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos()); in TEST()
735 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).end_bucket_elapsed_nanos()); in TEST()
746 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, data.bucket_info(0).start_bucket_elapsed_nanos()); in TEST()
[all …]
/packages/modules/StatsD/statsd/tests/metrics/
DMaxDurationTracker_test.cpp50 const int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL; variable
63 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
68 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {}); in TEST()
83 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
98 int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL; in TEST() local
100 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
105 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {}); in TEST()
113 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 40, emptyThreshold, &buckets); in TEST()
114 tracker.noteStopAll(bucketStartTimeNs + bucketSizeNs + 40); in TEST()
118 tracker.flushIfNeeded(bucketStartTimeNs + 3 * bucketSizeNs + 40, emptyThreshold, &buckets); in TEST()
[all …]
DDurationMetricProducer_test.cpp89 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL; in TEST() local
100 makeLogEvent(&event2, bucketStartTimeNs + bucketSizeNs + 2, tagId); in TEST()
112 durationProducer.flushIfNeededLocked(bucketStartTimeNs + 2 * bucketSizeNs + 1); in TEST()
119 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[0].mBucketEndNs); in TEST()
120 EXPECT_EQ(bucketSizeNs - 1LL, buckets[0].mDuration); in TEST()
121 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[1].mBucketStartNs); in TEST()
122 EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets[1].mBucketEndNs); in TEST()
129 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL; in TEST() local
142 makeLogEvent(&event3, bucketStartTimeNs + bucketSizeNs + 1, tagId); in TEST()
144 makeLogEvent(&event4, bucketStartTimeNs + bucketSizeNs + 3, tagId); in TEST()
[all …]
DOringDurationTracker_test.cpp48 const int64_t bucketSizeNs = 30 * NS_PER_SEC; variable
59 int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL; in TEST() local
66 bucketStartTimeNs, bucketNum, bucketStartTimeNs, bucketSizeNs, in TEST()
77 tracker.flushIfNeeded(eventStartTimeNs + bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
93 int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL; in TEST() local
99 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {}); in TEST()
109 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
126 int64_t bucketSizeNs = 30 * 1000 * 1000 * 1000LL; in TEST() local
132 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {}); in TEST()
141 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
[all …]
DCountMetricProducer_test.cpp89 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL; in TEST() local
90 int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
91 int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs; in TEST()
118 countProducer.flushIfNeededLocked(bucketStartTimeNs + bucketSizeNs + 1); in TEST()
125 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[0].mBucketEndNs); in TEST()
130 makeLogEvent(&event3, bucketStartTimeNs + bucketSizeNs + 2, tagId); in TEST()
134 countProducer.flushIfNeededLocked(bucketStartTimeNs + 2 * bucketSizeNs + 1); in TEST()
141 EXPECT_EQ(bucket2StartTimeNs + bucketSizeNs, bucketInfo2.mBucketEndNs); in TEST()
145 countProducer.flushIfNeededLocked(bucketStartTimeNs + 3 * bucketSizeNs + 1); in TEST()
155 int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL; in TEST() local
[all …]
DKllMetricProducer_test.cpp56 const int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL; variable
57 const int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs;
58 const int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs;
59 const int64_t bucket4StartTimeNs = bucketStartTimeNs + 3 * bucketSizeNs;
60 const int64_t bucket5StartTimeNs = bucketStartTimeNs + 4 * bucketSizeNs;
61 const int64_t bucket6StartTimeNs = bucketStartTimeNs + 5 * bucketSizeNs;
120 const int64_t bucketSizeNs = MillisToNano( local
143 {timeBaseNs, startTimeNs, bucketSizeNs, metric.min_bucket_size_nanos(),
222 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, kllProducer->mCurrentBucketStartTimeNs); in TEST_P()
252 TRACE_CALL(assertPastBucketsSingleKey, kllProducer->mPastBuckets, {2}, {bucketSizeNs}, in TEST()
DGaugeMetricProducer_test.cpp53 const int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL; variable
54 const int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs;
55 const int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs;
56 const int64_t bucket4StartTimeNs = bucketStartTimeNs + 3 * bucketSizeNs;
291 EXPECT_EQ((int64_t)bucketStartTimeNs + bucketSizeNs, gaugeProducer.mCurrentBucketStartTimeNs); in TEST_P()
370 allData.push_back(CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + bucketSizeNs + 1, 3)); in TEST_P()
372 bucketStartTimeNs + bucketSizeNs); in TEST_P()
626 CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + bucketSizeNs + 20, 15); in TEST()
631 bucketStartTimeNs + bucketSizeNs); in TEST()
642 CreateRepeatedValueLogEvent(tagId, bucketStartTimeNs + 2 * bucketSizeNs + 10, 26)); in TEST()
[all …]
DNumericValueMetricProducer_test.cpp55 const int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL; variable
56 const int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs;
57 const int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs;
58 const int64_t bucket4StartTimeNs = bucketStartTimeNs + 3 * bucketSizeNs;
59 const int64_t bucket5StartTimeNs = bucketStartTimeNs + 4 * bucketSizeNs;
60 const int64_t bucket6StartTimeNs = bucketStartTimeNs + 5 * bucketSizeNs;
326 assertPastBucketValuesSingleKey(valueProducer->mPastBuckets, {8}, {bucketSizeNs}, {0}, in TEST()
341 valueProducer->mPastBuckets, {8, 12}, {bucketSizeNs, bucketSizeNs}, {0, 0}, in TEST()
356 {bucketSizeNs, bucketSizeNs, bucketSizeNs}, {0, 0, 0}, in TEST()
408 {bucketSizeNs, partialBucketSplitTimeNs - bucket2StartTimeNs}, in TEST_P()
[all …]
/packages/modules/StatsD/statsd/benchmark/
Dduration_metric_benchmark.cpp136 int64_t bucketSizeNs = in BM_DurationMetricNoLink() local
153 events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + bucketSizeNs + 100, in BM_DurationMetricNoLink()
156 events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + bucketSizeNs + 640, in BM_DurationMetricNoLink()
158 events.push_back(CreateScreenStateChangedEvent(bucketStartTimeNs + bucketSizeNs + 650, in BM_DurationMetricNoLink()
176 events.push_back(CreateFinishScheduledJobEvent(bucketStartTimeNs + bucketSizeNs + 850, in BM_DurationMetricNoLink()
179 events.push_back(CreateStartScheduledJobEvent(bucketStartTimeNs + bucketSizeNs + 600, in BM_DurationMetricNoLink()
181 events.push_back(CreateFinishScheduledJobEvent(bucketStartTimeNs + bucketSizeNs + 900, in BM_DurationMetricNoLink()
193 events.push_back(CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs + 300, attributionUids3, in BM_DurationMetricNoLink()
198 events.push_back(CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs - 1, attributionUids3, in BM_DurationMetricNoLink()
205 events.push_back(CreateSyncEndEvent(bucketStartTimeNs + bucketSizeNs + 700, attributionUids4, in BM_DurationMetricNoLink()
[all …]
/packages/modules/StatsD/statsd/tests/anomaly/
DAnomalyTracker_test.cpp125 const int64_t bucketSizeNs = 30 * NS_PER_SEC; in TEST() local
126 const int32_t refractoryPeriodSec = 2 * bucketSizeNs / NS_PER_SEC; in TEST()
138 int64_t eventTimestamp1 = bucketSizeNs + 11 * NS_PER_SEC; in TEST()
139 int64_t eventTimestamp2 = 2 * bucketSizeNs + 12 * NS_PER_SEC; in TEST()
140 int64_t eventTimestamp3 = 3 * bucketSizeNs + 13 * NS_PER_SEC; in TEST()
141 int64_t eventTimestamp4 = 4 * bucketSizeNs + 14 * NS_PER_SEC; in TEST()
142 int64_t eventTimestamp5 = 5 * bucketSizeNs + 5 * NS_PER_SEC; in TEST()
143 int64_t eventTimestamp6 = 6 * bucketSizeNs + 16 * NS_PER_SEC; in TEST()
270 const int64_t bucketSizeNs = 30 * NS_PER_SEC; in TEST() local
271 const int32_t refractoryPeriodSec = 2 * bucketSizeNs / NS_PER_SEC; in TEST()
[all …]
/packages/modules/StatsD/statsd/tests/
DStatsService_test.cpp178 const int64_t bucketSizeNs = in TEST_F() local
180 const int64_t dumpReportTsNanos = createConfigTimeNs + bucketSizeNs + NS_PER_SEC; in TEST_F()
222 NanoToMillis(service->mProcessor->mTimeBaseNs + bucketSizeNs)); in TEST_F()

12