Lines Matching refs:bucketStartTimeNs
62 int64_t bucketStartTimeNs = 10000000000; in TEST() local
63 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
67 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST()
68 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {}); in TEST()
70 tracker.noteStart(key1, true, bucketStartTimeNs, ConditionKey(), in TEST()
73 tracker.noteStart(key1, true, bucketStartTimeNs + 3, ConditionKey(), in TEST()
76 tracker.noteStop(key1, bucketStartTimeNs + 10, false); in TEST()
79 tracker.noteStart(key2, true, bucketStartTimeNs + 20, ConditionKey(), in TEST()
81 tracker.noteStop(key2, bucketStartTimeNs + 40, false /*stop all*/); in TEST()
83 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
99 int64_t bucketStartTimeNs = 10000000000; in TEST() local
100 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
104 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST()
105 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {}); in TEST()
107 tracker.noteStart(key1, true, bucketStartTimeNs + 1, ConditionKey(), in TEST()
111 tracker.noteStart(key2, true, bucketStartTimeNs + 20, ConditionKey(), 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()
122 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[eventKey][0].mBucketStartNs); in TEST()
123 EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets[eventKey][0].mBucketEndNs); in TEST()
135 int64_t bucketStartTimeNs = 10000000000; in TEST() local
136 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
140 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST()
141 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {}); in TEST()
144 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + 1, ConditionKey(), in TEST()
148 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + bucketSizeNs + 1, in TEST()
154 tracker.flushIfNeeded(bucketStartTimeNs + (3 * bucketSizeNs) + 20, emptyThreshold, &buckets); in TEST()
155 tracker.noteStop(DEFAULT_DIMENSION_KEY, bucketStartTimeNs + (3 * bucketSizeNs) + 20, in TEST()
159 tracker.flushIfNeeded(bucketStartTimeNs + 4 * bucketSizeNs, emptyThreshold, &buckets); in TEST()
162 EXPECT_EQ(bucketStartTimeNs + 3 * bucketSizeNs, buckets[eventKey][0].mBucketStartNs); in TEST()
163 EXPECT_EQ(bucketStartTimeNs + 4 * bucketSizeNs, buckets[eventKey][0].mBucketEndNs); in TEST()
175 int64_t bucketStartTimeNs = 10000000000; in TEST() local
176 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
180 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, true, bucketStartTimeNs, in TEST()
181 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {}); in TEST()
184 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + 1, ConditionKey(), in TEST()
186 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + 10, ConditionKey(), in TEST()
189 tracker.noteStop(DEFAULT_DIMENSION_KEY, bucketStartTimeNs + 20, false /*stop all*/); in TEST()
191 tracker.flushIfNeeded(bucketStartTimeNs + (2 * bucketSizeNs) + 1, emptyThreshold, &buckets); in TEST()
197 bucketStartTimeNs + (2 * bucketSizeNs) + 5, false); in TEST()
198 tracker.flushIfNeeded(bucketStartTimeNs + (3 * bucketSizeNs) + 1, emptyThreshold, &buckets); in TEST()
217 int64_t bucketStartTimeNs = 10000000000; in TEST() local
218 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
219 int64_t eventStartTimeNs = bucketStartTimeNs + 1 * NS_PER_SEC; in TEST()
220 int64_t conditionStarts1 = bucketStartTimeNs + 11 * NS_PER_SEC; in TEST()
221 int64_t conditionStops1 = bucketStartTimeNs + 14 * NS_PER_SEC; in TEST()
222 int64_t conditionStarts2 = bucketStartTimeNs + bucketSizeNs + 5 * NS_PER_SEC; in TEST()
227 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST()
228 0, bucketStartTimeNs, bucketSizeNs, true, false, {}); in TEST()
236 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
242 tracker.flushIfNeeded(bucketStartTimeNs + 2 * bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
259 int64_t bucketStartTimeNs = 10000000000; in TEST() local
260 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
276 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST()
277 bucketNum, bucketStartTimeNs, bucketSizeNs, true, false, in TEST()
316 int64_t bucketStartTimeNs = 10000000000; in TEST() local
317 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
319 int64_t eventStartTimeNs = bucketStartTimeNs + 5 * NS_PER_SEC; // Condition is off at start. in TEST()
320 int64_t conditionStarts1 = bucketStartTimeNs + 11 * NS_PER_SEC; in TEST()
321 int64_t conditionStops1 = bucketStartTimeNs + 14 * NS_PER_SEC; in TEST()
322 int64_t conditionStarts2 = bucketStartTimeNs + 20 * NS_PER_SEC; in TEST()
336 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST()
337 bucketNum, bucketStartTimeNs, bucketSizeNs, true, false, in TEST()
404 int64_t bucketStartTimeNs = 10000000000; in TEST() local
405 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
407 int64_t eventStartTimeNs1 = bucketStartTimeNs + 5 * NS_PER_SEC; // Condition is off at start. in TEST()
408 int64_t eventStopTimeNs1 = bucketStartTimeNs + 13 * NS_PER_SEC; in TEST()
409 int64_t eventStartTimeNs2 = bucketStartTimeNs + 8 * NS_PER_SEC; in TEST()
422 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST()
423 bucketNum, bucketStartTimeNs, bucketSizeNs, true, false, in TEST()
443 int64_t bucketStartTimeNs = 10000000000; in TEST() local
445 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST()
446 int64_t event2StartTimeNs = bucketStartTimeNs + bucketSizeNs + 1; in TEST()
452 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST()
453 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {}); in TEST()
482 int64_t bucketStartTimeNs = 10000000000; in TEST() local
483 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
487 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST()
488 bucketNum, bucketStartTimeNs, bucketSizeNs, false, false, {}); in TEST()
490 tracker.noteStart(key1, true, bucketStartTimeNs + 1, ConditionKey(), in TEST()
492 tracker.noteStop(key1, bucketStartTimeNs + 50, false); in TEST()
496 tracker.noteStart(key1, true, bucketStartTimeNs + 100, ConditionKey(), in TEST()
499 tracker.noteConditionChanged(key1, false, bucketStartTimeNs + 150); in TEST()
503 tracker.noteStop(key1, bucketStartTimeNs + 200, true); in TEST()