Home
last modified time | relevance | path

Searched refs:bucketStartTimeNs (Results 1 – 21 of 21) sorted by relevance

/frameworks/base/cmds/statsd/tests/metrics/
DDurationMetricProducer_test.cpp61 int64_t bucketStartTimeNs = 10000000000; in TEST() local
70 LogEvent event1(tagId, bucketStartTimeNs + 1); in TEST()
72 LogEvent event2(tagId, bucketStartTimeNs + bucketSizeNs + 2); in TEST()
78 …/* stop_all index */, false /*nesting*/, wizard, dimensions, bucketStartTimeNs, bucketStartTimeNs); in TEST()
82 durationProducer.flushIfNeededLocked(bucketStartTimeNs + 2 * bucketSizeNs + 1); in TEST()
88 EXPECT_EQ(bucketStartTimeNs, buckets[0].mBucketStartNs); in TEST()
89 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[0].mBucketEndNs); in TEST()
91 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[1].mBucketStartNs); in TEST()
92 EXPECT_EQ(bucketStartTimeNs + 2 * bucketSizeNs, buckets[1].mBucketEndNs); in TEST()
98 int64_t bucketStartTimeNs = 10000000000; in TEST() local
[all …]
DMaxDurationTracker_test.cpp61 int64_t bucketStartTimeNs = 10000000000; in TEST() local
62 int64_t bucketEndTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
67 false, bucketStartTimeNs, bucketNum, bucketStartTimeNs, bucketSizeNs, in TEST()
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, &buckets); in TEST()
97 int64_t bucketStartTimeNs = 10000000000; in TEST() local
[all …]
DCountMetricProducer_test.cpp54 int64_t bucketStartTimeNs = 10000000000; in TEST() local
56 int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs; in TEST()
57 int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs; in TEST()
64 LogEvent event1(tagId, bucketStartTimeNs + 1); in TEST()
66 LogEvent event2(tagId, bucketStartTimeNs + 2); in TEST()
72 bucketStartTimeNs, bucketStartTimeNs); in TEST()
79 countProducer.flushIfNeededLocked(bucketStartTimeNs + 2); in TEST()
83 countProducer.flushIfNeededLocked(bucketStartTimeNs + bucketSizeNs + 1); in TEST()
89 EXPECT_EQ(bucketStartTimeNs, buckets[0].mBucketStartNs); in TEST()
90 EXPECT_EQ(bucketStartTimeNs + bucketSizeNs, buckets[0].mBucketEndNs); in TEST()
[all …]
DEventMetricProducer_test.cpp39 int64_t bucketStartTimeNs = 10000000000; in TEST() local
40 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST()
46 LogEvent event1(1 /*tag id*/, bucketStartTimeNs + 1); in TEST()
47 LogEvent event2(1 /*tag id*/, bucketStartTimeNs + 2); in TEST()
52 bucketStartTimeNs); in TEST()
62 int64_t bucketStartTimeNs = 10000000000; in TEST() local
63 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST()
70 LogEvent event1(1, bucketStartTimeNs + 1); in TEST()
71 LogEvent event2(1, bucketStartTimeNs + 10); in TEST()
75 EventMetricProducer eventProducer(kConfigKey, metric, 1, wizard, bucketStartTimeNs); in TEST()
[all …]
DOringDurationTracker_test.cpp60 int64_t bucketStartTimeNs = 10000000000; in TEST() local
62 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST()
66 false, bucketStartTimeNs, bucketNum, bucketStartTimeNs, in TEST()
93 int64_t bucketStartTimeNs = 10000000000; in TEST() local
95 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST()
98 true, bucketStartTimeNs, bucketNum, bucketStartTimeNs, in TEST()
107 tracker.flushIfNeeded(bucketStartTimeNs + bucketSizeNs + 1, &buckets); in TEST()
126 int64_t bucketStartTimeNs = 10000000000; in TEST() local
128 int64_t eventStartTimeNs = bucketStartTimeNs + 1; in TEST()
131 true, bucketStartTimeNs, bucketNum, bucketStartTimeNs, in TEST()
[all …]
DGaugeMetricProducer_test.cpp46 const int64_t bucketStartTimeNs = 10 * NS_PER_SEC; variable
48 const int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs;
49 const int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs;
50 const int64_t bucket4StartTimeNs = bucketStartTimeNs + 3 * bucketSizeNs;
51 const int64_t eventUpgradeTimeNs = bucketStartTimeNs + 15 * NS_PER_SEC;
115 shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucketStartTimeNs + 10); in TEST()
126 tagId, -1, tagId, bucketStartTimeNs, bucketStartTimeNs, in TEST()
212 -1 /* -1 means no pulling */, -1, tagId, bucketStartTimeNs, in TEST()
213 bucketStartTimeNs, pullerManager); in TEST()
219 shared_ptr<LogEvent> event1 = make_shared<LogEvent>(tagId, bucketStartTimeNs + 10); in TEST()
[all …]
DValueMetricProducer_test.cpp47 const int64_t bucketStartTimeNs = 10000000000; variable
49 const int64_t bucket2StartTimeNs = bucketStartTimeNs + bucketSizeNs;
50 const int64_t bucket3StartTimeNs = bucketStartTimeNs + 2 * bucketSizeNs;
51 const int64_t bucket4StartTimeNs = bucketStartTimeNs + 3 * bucketSizeNs;
52 const int64_t bucket5StartTimeNs = bucketStartTimeNs + 4 * bucketSizeNs;
53 const int64_t bucket6StartTimeNs = bucketStartTimeNs + 5 * bucketSizeNs;
107 bucketStartTimeNs, bucketStartTimeNs, pullerManager); in createValueProducerNoConditions()
126 eventMatcherWizard, tagId, bucketStartTimeNs, in createValueProducerWithCondition()
127 bucketStartTimeNs, pullerManager); in createValueProducerWithCondition()
218 shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucketStartTimeNs); in TEST()
[all …]
/frameworks/base/cmds/statsd/tests/e2e/
DDimensionInCondition_e2e_combination_AND_cond_test.cpp120 int64_t bucketStartTimeNs = 10000000000; in TEST() local
126 bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
141 bucketStartTimeNs + 11)); in TEST()
143 bucketStartTimeNs + 40)); in TEST()
146 bucketStartTimeNs + 102)); in TEST()
148 bucketStartTimeNs + 450)); in TEST()
151 bucketStartTimeNs + 650)); in TEST()
154 bucketStartTimeNs + bucketSizeNs + 100)); in TEST()
158 bucketStartTimeNs + bucketSizeNs + 640)); in TEST()
161 bucketStartTimeNs + bucketSizeNs + 650)); in TEST()
[all …]
DDimensionInCondition_e2e_simple_cond_test.cpp78 int64_t bucketStartTimeNs = 10000000000; in TEST() local
83 bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
98 {CreateAttribution(9999, "")}, "job0", bucketStartTimeNs + 1)); in TEST()
100 {CreateAttribution(9999, "")}, "job0",bucketStartTimeNs + 101)); in TEST()
103 {CreateAttribution(9999, "")}, "job2", bucketStartTimeNs + 201)); in TEST()
105 {CreateAttribution(9999, "")}, "job2",bucketStartTimeNs + 500)); in TEST()
108 {CreateAttribution(8888, "")}, "job2", bucketStartTimeNs + 600)); in TEST()
110 {CreateAttribution(8888, "")}, "job2",bucketStartTimeNs + bucketSizeNs + 850)); in TEST()
113 {CreateAttribution(8888, "")}, "job1", bucketStartTimeNs + bucketSizeNs + 600)); in TEST()
115 {CreateAttribution(8888, "")}, "job1", bucketStartTimeNs + bucketSizeNs + 900)); in TEST()
[all …]
DDimensionInCondition_e2e_combination_OR_cond_test.cpp74 int64_t bucketStartTimeNs = 10000000000; in TEST() local
78 auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
92 CreateScreenStateChangedEvent(android::view::DISPLAY_STATE_ON, bucketStartTimeNs + 10)); in TEST()
94 bucketStartTimeNs + 100)); in TEST()
96 bucketStartTimeNs + bucketSizeNs + 1)); in TEST()
98 bucketStartTimeNs + 2 * bucketSizeNs - 10)); in TEST()
100 events.push_back(CreateAcquireWakelockEvent(attributions1, "wl1", bucketStartTimeNs + 200)); in TEST()
102 CreateReleaseWakelockEvent(attributions1, "wl1", bucketStartTimeNs + bucketSizeNs + 1)); in TEST()
105 bucketStartTimeNs + bucketSizeNs - 100)); in TEST()
107 bucketStartTimeNs + 2 * bucketSizeNs - 50)); in TEST()
[all …]
DAnomaly_duration_sum_e2e_test.cpp99 int64_t bucketStartTimeNs = 10 * NS_PER_SEC; in TEST() local
104 auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
113 android::view::DisplayStateEnum::DISPLAY_STATE_ON, bucketStartTimeNs + 1); in TEST()
115 android::view::DisplayStateEnum::DISPLAY_STATE_OFF, bucketStartTimeNs + 10); in TEST()
120 auto acquire_event = CreateAcquireWakelockEvent(attributions1, "wl1", bucketStartTimeNs + 11); in TEST()
122 EXPECT_EQ((bucketStartTimeNs + 11 + threshold_ns) / NS_PER_SEC + 1, in TEST()
127 auto release_event = CreateReleaseWakelockEvent(attributions1, "wl1", bucketStartTimeNs + 101); in TEST()
133 acquire_event = CreateAcquireWakelockEvent(attributions2, "wl1", bucketStartTimeNs + 110); in TEST()
135 EXPECT_EQ((bucketStartTimeNs + 110 + threshold_ns - 90) / NS_PER_SEC + 1, in TEST()
141 attributions2, "wl1", bucketStartTimeNs + NS_PER_SEC + 109); in TEST()
[all …]
DAttribution_e2e_test.cpp60 int64_t bucketStartTimeNs = 10000000000; in TEST() local
65 auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
116 attributions1, "wl1", bucketStartTimeNs + 2)); in TEST()
118 attributions2, "wl1", bucketStartTimeNs + 200)); in TEST()
120 attributions3, "wl1", bucketStartTimeNs + bucketSizeNs - 1)); in TEST()
122 attributions4, "wl1", bucketStartTimeNs + bucketSizeNs)); in TEST()
126 attributions5, "wl2", bucketStartTimeNs + 2 * bucketSizeNs + 1)); in TEST()
128 attributions6, "wl2", bucketStartTimeNs + 2 * bucketSizeNs + 100)); in TEST()
130 attributions7, "wl2", bucketStartTimeNs + 3 * bucketSizeNs - 2)); in TEST()
132 attributions8, "wl2", bucketStartTimeNs + 3 * bucketSizeNs)); in TEST()
[all …]
DAnomaly_count_e2e_test.cpp63 int64_t bucketStartTimeNs = 10000000000; in TEST() local
68 auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
96 auto event = CreateAcquireWakelockEvent(attributions1, "wl1", bucketStartTimeNs + 2); in TEST()
100 event = CreateAcquireWakelockEvent(attributions4, "wl2", bucketStartTimeNs + 2); in TEST()
104 event = CreateAcquireWakelockEvent(attributions2, "wl1", bucketStartTimeNs + 3); in TEST()
108 event = CreateAcquireWakelockEvent(attributions5, "wl2", bucketStartTimeNs + 3); in TEST()
112 event = CreateAcquireWakelockEvent(attributions3, "wl1", bucketStartTimeNs + 4); in TEST()
116 event = CreateAcquireWakelockEvent(attributions5, "wl2", bucketStartTimeNs + 4); in TEST()
121 event = CreateAcquireWakelockEvent(attributions1, "wl1", bucketStartTimeNs + 5); in TEST()
123 EXPECT_EQ(refractory_period_sec + bucketStartTimeNs / NS_PER_SEC + 1, in TEST()
[all …]
DMetricConditionLink_e2e_test.cpp104 uint64_t bucketStartTimeNs = 10000000000; in TEST() local
109 auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
114 auto crashEvent1 = CreateAppCrashEvent(appUid, bucketStartTimeNs + 1); in TEST()
115 auto crashEvent2 = CreateAppCrashEvent(appUid, bucketStartTimeNs + 201); in TEST()
116 auto crashEvent3= CreateAppCrashEvent(appUid, bucketStartTimeNs + 2 * bucketSizeNs - 101); in TEST()
118 auto crashEvent4 = CreateAppCrashEvent(appUid, bucketStartTimeNs + 51); in TEST()
119 auto crashEvent5 = CreateAppCrashEvent(appUid, bucketStartTimeNs + bucketSizeNs + 299); in TEST()
120 auto crashEvent6 = CreateAppCrashEvent(appUid, bucketStartTimeNs + bucketSizeNs + 2001); in TEST()
122 auto crashEvent7 = CreateAppCrashEvent(appUid, bucketStartTimeNs + 16); in TEST()
123 auto crashEvent8 = CreateAppCrashEvent(appUid, bucketStartTimeNs + bucketSizeNs + 249); in TEST()
[all …]
DMetricActivation_e2e_test.cpp239 int64_t bucketStartTimeNs = NS_PER_SEC * 10; // 10 secs in TEST() local
256 bucketStartTimeNs, [](const ConfigKey& key) { return true; }, in TEST()
267 processor.OnConfigUpdated(bucketStartTimeNs, cfgKey, config); in TEST()
292 event = CreateAppCrashEvent(111, bucketStartTimeNs + 5); in TEST()
299 event = CreateBatterySaverOnEvent(bucketStartTimeNs + 10); in TEST()
307 EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10); in TEST()
314 event = CreateAppCrashEvent(222, bucketStartTimeNs + 15); in TEST()
319 bucketStartTimeNs + 20); in TEST()
324 EXPECT_EQ(eventActivationMap[0]->start_ns, bucketStartTimeNs + 10); in TEST()
327 EXPECT_EQ(eventActivationMap[2]->start_ns, bucketStartTimeNs + 20); in TEST()
[all …]
DWakelockDuration_e2e_test.cpp79 uint64_t bucketStartTimeNs = 10000000000; in FeedEvents() local
84 android::view::DisplayStateEnum::DISPLAY_STATE_ON, bucketStartTimeNs + 1); in FeedEvents()
86 android::view::DisplayStateEnum::DISPLAY_STATE_OFF, bucketStartTimeNs + 200); in FeedEvents()
89 bucketStartTimeNs + bucketSizeNs + 500); in FeedEvents()
91 auto acquireEvent1 = CreateAcquireWakelockEvent(attributions1, "wl1", bucketStartTimeNs + 2); in FeedEvents()
93 CreateReleaseWakelockEvent(attributions1, "wl1", bucketStartTimeNs + bucketSizeNs + 2); in FeedEvents()
95 CreateAcquireWakelockEvent(attributions2, "wl2", bucketStartTimeNs + bucketSizeNs - 10); in FeedEvents()
97 bucketStartTimeNs + 2 * bucketSizeNs - 15); in FeedEvents()
121 uint64_t bucketStartTimeNs = 10000000000; in TEST() local
124 auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
[all …]
DGaugeMetric_e2e_push_test.cpp94 int64_t bucketStartTimeNs = 10000000000; in TEST() local
100 bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
107 events.push_back(CreateMoveToBackgroundEvent(appUid1, bucketStartTimeNs + 15)); in TEST()
109 appUid1, bucketStartTimeNs + bucketSizeNs + 250)); in TEST()
111 appUid1, bucketStartTimeNs + bucketSizeNs + 350)); in TEST()
113 appUid1, bucketStartTimeNs + 2 * bucketSizeNs + 100)); in TEST()
118 true /*is_instant_app*/, 101 /*activity_start_msec*/, bucketStartTimeNs + 10)); in TEST()
121 true /*is_instant_app*/, 102 /*activity_start_msec*/, bucketStartTimeNs + 20)); in TEST()
124 true /*is_instant_app*/, 103 /*activity_start_msec*/, bucketStartTimeNs + 30)); in TEST()
128 bucketStartTimeNs + bucketSizeNs + 30)); in TEST()
[all …]
DDurationMetric_e2e_test.cpp225 const int64_t bucketStartTimeNs = 10000000000; in TEST() local
241 bucketStartTimeNs, [](const ConfigKey& key) { return true; }, in TEST()
252 processor.OnConfigUpdated(bucketStartTimeNs, cfgKey, config); // 0:00 in TEST()
273 android::view::DISPLAY_STATE_OFF, bucketStartTimeNs + 2 * NS_PER_SEC); // 0:02 in TEST()
277 const int64_t durationStartNs = bucketStartTimeNs + 5 * NS_PER_SEC; // 0:05 in TEST()
282 const int64_t activationStartNs = bucketStartTimeNs + 5 * NS_PER_SEC; // 0:10 in TEST()
342 processor.onDumpReport(cfgKey, bucketStartTimeNs + bucketSizeNs + 1 * NS_PER_SEC, false, true, in TEST()
362 EXPECT_EQ(bucketStartTimeNs, bucketInfo.start_bucket_elapsed_nanos()); in TEST()
389 uint64_t bucketStartTimeNs = 10000000000; in TEST() local
392 auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
[all …]
DConfigTtl_e2e_test.cpp66 int64_t bucketStartTimeNs = 10000000000; in TEST() local
71 auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
87 auto event = CreateAcquireWakelockEvent(attributions1, "wl1", bucketStartTimeNs + 2); in TEST()
90 event = CreateAcquireWakelockEvent(attributions1, "wl2", bucketStartTimeNs + bucketSizeNs + 2); in TEST()
94 attributions1, "wl1", bucketStartTimeNs + 25 * bucketSizeNs + 2); in TEST()
97 EXPECT_EQ((int64_t)(bucketStartTimeNs + 25 * bucketSizeNs + 2 + 2 * 3600 * NS_PER_SEC), in TEST()
DAlarm_e2e_test.cpp51 int64_t bucketStartTimeNs = 10000000000; in TEST() local
54 auto processor = CreateStatsLogProcessor(bucketStartTimeNs, bucketStartTimeNs, config, cfgKey); in TEST()
62 int64_t alarmTimestampSec0 = bucketStartTimeNs / NS_PER_SEC + 10 * 60; in TEST()
63 int64_t alarmTimestampSec1 = bucketStartTimeNs / NS_PER_SEC + 5 * 60; in TEST()
/frameworks/base/cmds/statsd/benchmark/
Dduration_metric_benchmark.cpp136 int64_t bucketStartTimeNs = 10000000000; in BM_DurationMetricNoLink() local
152 bucketStartTimeNs + 11)); in BM_DurationMetricNoLink()
154 bucketStartTimeNs + 40)); in BM_DurationMetricNoLink()
157 bucketStartTimeNs + 102)); in BM_DurationMetricNoLink()
159 bucketStartTimeNs + 450)); in BM_DurationMetricNoLink()
162 bucketStartTimeNs + 650)); in BM_DurationMetricNoLink()
164 bucketStartTimeNs + bucketSizeNs + 100)); in BM_DurationMetricNoLink()
167 bucketStartTimeNs + bucketSizeNs + 640)); in BM_DurationMetricNoLink()
169 bucketStartTimeNs + bucketSizeNs + 650)); in BM_DurationMetricNoLink()
172 {CreateAttribution(9999, "")}, "job0", bucketStartTimeNs + 2)); in BM_DurationMetricNoLink()
[all …]