Lines Matching refs:eventStartTimeNs
62 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST() local
69 tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey(), in TEST()
71 EXPECT_EQ((long long)eventStartTimeNs, tracker.mLastStartTime); in TEST()
72 tracker.noteStart(kEventKey1, true, eventStartTimeNs + 10, ConditionKey(), in TEST()
74 EXPECT_EQ((long long)eventStartTimeNs, tracker.mLastStartTime); in TEST()
76 tracker.noteStop(kEventKey1, eventStartTimeNs + durationTimeNs, false); in TEST()
77 tracker.flushIfNeeded(eventStartTimeNs + bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
96 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST() local
101 tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey(), in TEST()
103 tracker.noteStart(kEventKey1, true, eventStartTimeNs + 10, ConditionKey(), in TEST()
106 tracker.noteStop(kEventKey1, eventStartTimeNs + 2000, false); in TEST()
107 tracker.noteStop(kEventKey1, eventStartTimeNs + 2003, false); in TEST()
129 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST() local
134 tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey(), in TEST()
136 tracker.noteStart(kEventKey2, true, eventStartTimeNs + 10, ConditionKey(), in TEST()
139 tracker.noteStopAll(eventStartTimeNs + 2003); in TEST()
159 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST() local
165 tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey(), in TEST()
167 EXPECT_EQ((long long)eventStartTimeNs, tracker.mLastStartTime); in TEST()
168 tracker.flushIfNeeded(eventStartTimeNs + 2 * bucketSizeNs, emptyThreshold, &buckets); in TEST()
169 tracker.noteStart(kEventKey1, true, eventStartTimeNs + 2 * bucketSizeNs, ConditionKey(), in TEST()
177 tracker.noteStop(kEventKey1, eventStartTimeNs + 2 * bucketSizeNs + 10, false); in TEST()
178 tracker.noteStop(kEventKey1, eventStartTimeNs + 2 * bucketSizeNs + 12, false); in TEST()
179 tracker.flushIfNeeded(eventStartTimeNs + 2 * bucketSizeNs + 12, emptyThreshold, &buckets); in TEST()
204 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST() local
211 tracker.noteStart(kEventKey1, true, eventStartTimeNs, key1, in TEST()
214 tracker.onSlicedConditionMayChange(eventStartTimeNs + 5); in TEST()
216 tracker.noteStop(kEventKey1, eventStartTimeNs + durationTimeNs, false); in TEST()
244 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST() local
251 tracker.noteStart(kEventKey1, true, eventStartTimeNs, key1, in TEST()
254 tracker.onSlicedConditionMayChange(eventStartTimeNs + 5); in TEST()
256 tracker.onSlicedConditionMayChange(eventStartTimeNs + 1000); in TEST()
258 tracker.noteStop(kEventKey1, eventStartTimeNs + durationTimeNs, false); in TEST()
284 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST() local
289 tracker.noteStart(kEventKey1, true, eventStartTimeNs, key1, in TEST()
291 tracker.noteStart(kEventKey1, true, eventStartTimeNs + 2, key1, in TEST()
294 tracker.noteStop(kEventKey1, eventStartTimeNs + 3, false); in TEST()
296 tracker.onSlicedConditionMayChange(eventStartTimeNs + 15); in TEST()
298 tracker.noteStop(kEventKey1, eventStartTimeNs + 2003, false); in TEST()
323 int64_t eventStartTimeNs = bucketStartTimeNs + NS_PER_SEC + 1; in TEST() local
333 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, eventStartTimeNs, ConditionKey(), in TEST()
335 EXPECT_EQ((long long)(alert.trigger_if_sum_gt() + eventStartTimeNs), in TEST()
336 tracker.predictAnomalyTimestampNs(*anomalyTracker, eventStartTimeNs)); in TEST()
338 tracker.noteStop(DEFAULT_DIMENSION_KEY, eventStartTimeNs + 3, false); in TEST()
341 int64_t event1StartTimeNs = eventStartTimeNs + 10; in TEST()
348 int64_t event1StopTimeNs = eventStartTimeNs + bucketSizeNs + 10; in TEST()
354 EXPECT_EQ(3LL + bucketStartTimeNs + bucketSizeNs - eventStartTimeNs - 10, in TEST()
357 const int64_t bucket0Duration = 3ULL + bucketStartTimeNs + bucketSizeNs - eventStartTimeNs - 10; in TEST()
358 const int64_t bucket1Duration = eventStartTimeNs + 10 - bucketStartTimeNs; in TEST()
361 int64_t event2StartTimeNs = eventStartTimeNs + bucketSizeNs + 15; in TEST()
398 int64_t eventStartTimeNs = bucketStartTimeNs + 9 * NS_PER_SEC; in TEST() local
399 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, eventStartTimeNs, ConditionKey(), in TEST()
403 tracker.predictAnomalyTimestampNs(*anomalyTracker, eventStartTimeNs)); in TEST()
443 int64_t eventStartTimeNs = bucketStartTimeNs + 9 * NS_PER_SEC; in TEST() local
444 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, eventStartTimeNs, ConditionKey(), in TEST()
446 EXPECT_EQ((long long)(eventStartTimeNs + thresholdNs), in TEST()
447 tracker.predictAnomalyTimestampNs(*anomalyTracker, eventStartTimeNs)); in TEST()
448 int64_t eventStopTimeNs = eventStartTimeNs + thresholdNs + NS_PER_SEC; in TEST()
494 int64_t eventStartTimeNs = bucketStartTimeNs + NS_PER_SEC + 1; in TEST() local
503 tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey(), in TEST()
505 tracker.noteStop(kEventKey1, eventStartTimeNs + 10, false); in TEST()
512 tracker.noteStart(kEventKey1, true, eventStartTimeNs + 20, ConditionKey(), in TEST()
520 tracker.flushIfNeeded(eventStartTimeNs + 2 * bucketSizeNs + 25, emptyThreshold, &buckets); in TEST()
521 tracker.noteStop(kEventKey1, eventStartTimeNs + 2 * bucketSizeNs + 25, false); in TEST()
524 std::ceil((eventStartTimeNs + 2 * bucketSizeNs + 25.0) / NS_PER_SEC + refPeriodSec)); in TEST()
604 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST() local
616 tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey(), in TEST()
618 tracker.noteStop(kEventKey1, eventStartTimeNs + thresholdDurationNs, false); in TEST()
619 tracker.flushIfNeeded(eventStartTimeNs + bucketSizeNs + 1, threshold, &buckets); in TEST()
647 int64_t eventStartTimeNs = bucketStartTimeNs + NS_PER_SEC + 1; in TEST() local
656 tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey(), in TEST()
692 int64_t eventStartTimeNs = bucketStartTimeNs + NS_PER_SEC + 1; in TEST() local
700 tracker.noteStart(kEventKey1, true, eventStartTimeNs, ConditionKey(), in TEST()
702 tracker.noteStop(kEventKey1, eventStartTimeNs + 10, false); in TEST()
703 tracker.flushCurrentBucket(eventStartTimeNs + 20, emptyThreshold, 0, &buckets); in TEST()