/packages/modules/StatsD/statsd/tests/e2e/ |
D | GaugeMetric_e2e_pull_test.cpp | 73 int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs; in TEST() local 78 CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey, in TEST() 99 CreateScreenStateChangedEvent(configAddedTimeNs + 55, android::view::DISPLAY_STATE_OFF); in TEST() 106 auto screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + bucketSizeNs + 10, in TEST() 110 screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + bucketSizeNs + 100, in TEST() 120 screenOnEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 3 * bucketSizeNs + 2, in TEST() 127 screenOffEvent = CreateScreenStateChangedEvent(configAddedTimeNs + 5 * bucketSizeNs + 1, in TEST() 138 processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true, in TEST() 163 EXPECT_EQ(configAddedTimeNs + 55, data.bucket_info(0).elapsed_timestamp_nanos(0)); in TEST() 216 int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs; in TEST() local [all …]
|
D | RestrictedEventMetric_e2e_test.cpp | 62 int64_t configAddedTimeNs; member in android::os::statsd::RestrictedEventMetricE2eTest 107 configAddedTimeNs = baseTimeNs + 1 * NS_PER_SEC; // 0:01 in SetUp() 110 uidMap->updateApp(configAddedTimeNs, delegate_package_name, in SetUp() 114 uidMap->updateApp(configAddedTimeNs + 1, config_package_name, in SetUp() 119 processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, configKey, in SetUp() 139 events.push_back(CreateRestrictedLogEvent(atomTag, configAddedTimeNs + 100)); in TEST_F() 140 events.push_back(CreateRestrictedLogEvent(atomTag, configAddedTimeNs + 200)); in TEST_F() 141 events.push_back(CreateRestrictedLogEvent(atomTag, configAddedTimeNs + 300)); in TEST_F() 156 EXPECT_THAT(queryDataResult, ElementsAre(to_string(atomTag), to_string(configAddedTimeNs + 100), in TEST_F() 159 to_string(atomTag), to_string(configAddedTimeNs + 200), in TEST_F() [all …]
|
D | GaugeMetric_e2e_push_test.cpp | 435 const int64_t configAddedTimeNs = 10 * NS_PER_SEC; // 0:10 in TEST_F() local 444 configAddedTimeNs, configAddedTimeNs, config, cfgKey, nullptr, 0, new UidMap()); in TEST_F() 450 const int64_t gaugeEventTimeNs1 = configAddedTimeNs + 20 * NS_PER_SEC; in TEST_F() 451 const int64_t gaugeEventTimeNs2 = configAddedTimeNs + 40 * NS_PER_SEC; in TEST_F() 452 const int64_t gaugeEventTimeNs3 = configAddedTimeNs + 60 * NS_PER_SEC; in TEST_F() 453 const int64_t gaugeEventTimeNs4 = configAddedTimeNs + 100 * NS_PER_SEC; in TEST_F() 454 const int64_t gaugeEventTimeNs5 = configAddedTimeNs + 110 * NS_PER_SEC; in TEST_F() 455 const int64_t gaugeEventTimeNs6 = configAddedTimeNs + 150 * NS_PER_SEC; in TEST_F() 472 processor->onDumpReport(cfgKey, configAddedTimeNs + bucketSizeNs + 1, false, true, ADB_DUMP, in TEST_F() 491 ValidateGaugeBucketTimes(data.bucket_info(0), configAddedTimeNs, in TEST_F() [all …]
|
D | RestrictedConfig_e2e_test.cpp | 60 std::vector<std::unique_ptr<LogEvent>> CreateLogEvents(int64_t configAddedTimeNs) { in CreateLogEvents() argument 62 events.push_back(CreateNonRestrictedLogEvent(atomTag, configAddedTimeNs + 10 * NS_PER_SEC)); in CreateLogEvents() 63 events.push_back(CreateNonRestrictedLogEvent(atomTag, configAddedTimeNs + 20 * NS_PER_SEC)); in CreateLogEvents() 64 events.push_back(CreateNonRestrictedLogEvent(atomTag, configAddedTimeNs + 30 * NS_PER_SEC)); in CreateLogEvents() 155 int64_t configAddedTimeNs = getElapsedRealtimeNs(); in TEST_F() local 157 for (auto& event : CreateLogEvents(configAddedTimeNs)) { in TEST_F() 171 int64_t configAddedTimeNs = getElapsedRealtimeNs(); in TEST_F() local 173 for (auto& event : CreateLogEvents(configAddedTimeNs)) { in TEST_F() 185 int64_t configAddedTimeNs = getElapsedRealtimeNs(); in TEST_F() local 186 std::vector<std::unique_ptr<LogEvent>> logEvents = CreateLogEvents(configAddedTimeNs); in TEST_F() [all …]
|
D | ValueMetric_pull_e2e_test.cpp | 156 int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs; in TEST() local 162 CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey, in TEST() 179 CreateScreenStateChangedEvent(configAddedTimeNs + 30, android::view::DISPLAY_STATE_ON); in TEST() 185 CreateScreenStateChangedEvent(configAddedTimeNs + 40, android::view::DISPLAY_STATE_OFF); in TEST() 191 configAddedTimeNs + 50, BatteryPluggedStateEnum::BATTERY_PLUGGED_USB); in TEST() 197 configAddedTimeNs + 70, BatteryPluggedStateEnum::BATTERY_PLUGGED_NONE); in TEST() 206 int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs; in TEST() local 210 auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey, in TEST() 232 CreateScreenStateChangedEvent(configAddedTimeNs + 55, android::view::DISPLAY_STATE_OFF); in TEST() 236 CreateScreenStateChangedEvent(configAddedTimeNs + 65, android::view::DISPLAY_STATE_ON); in TEST() [all …]
|
D | DurationMetric_e2e_test.cpp | 49 const int64_t configAddedTimeNs = baseTimeNs + 1 * NS_PER_SEC; // 0:01 in TEST() local 57 auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey); in TEST() 70 event = CreateScreenStateChangedEvent(configAddedTimeNs, in TEST() 75 const int64_t durationStartNs = configAddedTimeNs + 10 * NS_PER_SEC; // 0:11 in TEST() 89 processor->onDumpReport(cfgKey, configAddedTimeNs + bucketSizeNs + 1 * NS_PER_SEC, false, true, in TEST() 109 EXPECT_EQ(configAddedTimeNs, data.bucket_info(0).start_bucket_elapsed_nanos()); in TEST() 132 const int64_t configAddedTimeNs = baseTimeNs + 1 * NS_PER_SEC; // 0:01 in TEST() local 140 auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey); in TEST() 153 event = CreateScreenStateChangedEvent(configAddedTimeNs, in TEST() 158 const int64_t durationStartNs = configAddedTimeNs + 10 * NS_PER_SEC; // 0:11 in TEST() [all …]
|
D | StringReplace_e2e_test.cpp | 258 int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs; in TEST() local 262 auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey, in TEST() 272 processor->onDumpReport(cfgKey, configAddedTimeNs + 3 * bucketSizeNs + 10, false, true, in TEST() 321 int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs; in TEST() local 325 auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey, in TEST() 331 CreateScreenStateChangedEvent(configAddedTimeNs + 55, android::view::DISPLAY_STATE_OFF); in TEST() 339 processor->onDumpReport(cfgKey, configAddedTimeNs + 3 * bucketSizeNs + 10, false, true, in TEST() 643 int64_t configAddedTimeNs = 10 * 60 * NS_PER_SEC + baseTimeNs; in TEST() local 647 auto processor = CreateStatsLogProcessor(baseTimeNs, configAddedTimeNs, config, cfgKey, in TEST() 657 processor->onDumpReport(cfgKey, configAddedTimeNs + 3 * bucketSizeNs + 10, false, true, in TEST()
|
/packages/modules/StatsD/statsd/tests/ |
D | StatsLogProcessor_test.cpp | 1748 int64_t configAddedTimeNs = metricsManager1->mLastReportTimeNs; in TEST() local 1752 1 + configAddedTimeNs, attributionUids, attributionTags, "wl1"); in TEST() 1756 2 + configAddedTimeNs, attributionUids, attributionTags, "finish1"); in TEST() 1772 EXPECT_EQ(2 + configAddedTimeNs, activation4->start_ns); in TEST() 1781 EXPECT_TRUE(approximateSystemServerDeath > 2 + configAddedTimeNs); in TEST() 1782 EXPECT_TRUE(approximateSystemServerDeath < NS_PER_SEC + configAddedTimeNs); in TEST() 1841 EXPECT_EQ(2 + configAddedTimeNs, activation1004->start_ns); in TEST() 1848 processor->onDumpReport(cfgKey1, configAddedTimeNs + NS_PER_SEC, false, true, ADB_DUMP, FAST, in TEST()
|