Lines Matching refs:tracker
67 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() local
70 tracker.noteStart(key1, true, bucketStartTimeNs, ConditionKey()); in TEST()
72 tracker.noteStart(key1, true, bucketStartTimeNs + 3, ConditionKey()); in TEST()
74 tracker.noteStop(key1, bucketStartTimeNs + 10, false); in TEST()
77 tracker.noteStart(key2, true, bucketStartTimeNs + 20, ConditionKey()); in TEST()
78 tracker.noteStop(key2, bucketStartTimeNs + 40, false /*stop all*/); in TEST()
80 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
101 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() local
104 tracker.noteStart(key1, true, bucketStartTimeNs + 1, ConditionKey()); in TEST()
107 tracker.noteStart(key2, true, bucketStartTimeNs + 20, ConditionKey()); in TEST()
108 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 40, emptyThreshold, &buckets); in TEST()
109 tracker.noteStopAll(bucketStartTimeNs + bucketSizeNs + 40); in TEST()
110 EXPECT_TRUE(tracker.mInfos.empty()); in TEST()
113 tracker.flushIfNeeded(bucketStartTimeNs + 3 * bucketSizeNs + 40, emptyThreshold, &buckets); in TEST()
135 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() local
139 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + 1, ConditionKey()); in TEST()
142 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + bucketSizeNs + 1, in TEST()
148 tracker.flushIfNeeded(bucketStartTimeNs + (3 * bucketSizeNs) + 20, emptyThreshold, &buckets); in TEST()
149 tracker.noteStop(DEFAULT_DIMENSION_KEY, bucketStartTimeNs + (3 * bucketSizeNs) + 20, in TEST()
153 tracker.flushIfNeeded(bucketStartTimeNs + 4 * bucketSizeNs, emptyThreshold, &buckets); in TEST()
174 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, true, bucketStartTimeNs, in TEST() local
178 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + 1, ConditionKey()); in TEST()
179 tracker.noteStart(DEFAULT_DIMENSION_KEY, true, bucketStartTimeNs + 10, ConditionKey()); in TEST()
181 tracker.noteStop(DEFAULT_DIMENSION_KEY, bucketStartTimeNs + 20, false /*stop all*/); in TEST()
183 tracker.flushIfNeeded(bucketStartTimeNs + (2 * bucketSizeNs) + 1, emptyThreshold, &buckets); in TEST()
188 tracker.noteStop(DEFAULT_DIMENSION_KEY, in TEST()
190 tracker.flushIfNeeded(bucketStartTimeNs + (3 * bucketSizeNs) + 1, emptyThreshold, &buckets); in TEST()
219 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST() local
221 EXPECT_TRUE(tracker.mAnomalyTrackers.empty()); in TEST()
223 tracker.noteStart(key1, false, eventStartTimeNs, conditionKey1); in TEST()
224 tracker.noteConditionChanged(key1, true, conditionStarts1); in TEST()
225 tracker.noteConditionChanged(key1, false, conditionStops1); in TEST()
227 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
230 tracker.noteConditionChanged(key1, true, conditionStarts2); in TEST()
231 tracker.noteConditionChanged(key1, false, conditionStops2); in TEST()
232 tracker.noteStop(key1, eventStopTimeNs, false); in TEST()
233 tracker.flushIfNeeded(bucketStartTimeNs + 2 * bucketSizeNs + 1, emptyThreshold, &buckets); in TEST()
267 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST() local
271 tracker.noteStart(key1, true, eventStartTimeNs, conditionKey1); in TEST()
276 tracker.noteConditionChanged(key1, false, eventStartTimeNs + 15 * NS_PER_SEC); in TEST()
280 tracker.noteConditionChanged(key1, true, eventStartTimeNs + 25 * NS_PER_SEC); in TEST()
326 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST() local
330 tracker.noteStart(key1, false, eventStartTimeNs, conditionKey1); in TEST()
331 tracker.noteConditionChanged(key1, true, conditionStarts1); in TEST()
332 tracker.noteConditionChanged(key1, false, conditionStops1); in TEST()
333 tracker.noteStart(key2, true, eventStartTimeNs2, conditionKey2); // Condition is on already. in TEST()
334 tracker.noteConditionChanged(key1, true, conditionStarts2); in TEST()
353 tracker.noteStop(key1, eventStopTimeNs, false); in TEST()
354 tracker.noteStop(key2, eventStopTimeNs, false); in TEST()
355 tracker.noteStart(key1, true, eventStopTimeNs + 1000000, conditionKey1); in TEST()
362 tracker.noteStop(key1, eventStopTimeNs + 2000000, false); in TEST()
364 tracker.noteStart(key1, true, justBeforeRefPeriodNs, conditionKey1); in TEST()
408 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST() local
412 tracker.noteStart(key1, true, eventStartTimeNs1, conditionKey1); in TEST()
413 tracker.noteStart(key2, true, eventStartTimeNs2, conditionKey2); in TEST()
414 tracker.noteStop(key1, eventStopTimeNs1, false); in TEST()
436 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST() local
440 tracker.noteStart(key1, true, eventStartTimeNs, ConditionKey()); in TEST()
441 tracker.noteStop(key1, eventStartTimeNs + thresholdDurationNs, false); in TEST()
442 tracker.flushIfNeeded(eventStartTimeNs + bucketSizeNs + 1, threshold, &buckets); in TEST()
446 tracker.noteStart(key1, true, event2StartTimeNs, ConditionKey()); in TEST()
447 tracker.noteStop(key1, event2StartTimeNs + thresholdDurationNs + 1, false); in TEST()
448 tracker.flushIfNeeded(event2StartTimeNs + bucketSizeNs + 1, threshold, &buckets); in TEST()