/packages/modules/StatsD/statsd/tests/e2e/ |
D | RestrictedConfig_e2e_test.cpp | 73 const ConfigKey configKey = ConfigKey(kCallingUid, kConfigKey); 162 ConfigKey configKey(kCallingUid, kConfigKey); in TEST_F() 163 service->getData(kConfigKey, kCallingUid, &output); in TEST_F() 194 EXPECT_FALSE(StorageManager::hasConfigMetricsReport(ConfigKey(kCallingUid, kConfigKey))); in TEST_F() 208 EXPECT_TRUE(StorageManager::hasConfigMetricsReport(ConfigKey(kCallingUid, kConfigKey))); in TEST_F() 223 EXPECT_FALSE(StorageManager::hasConfigMetricsReport(ConfigKey(kCallingUid, kConfigKey))); in TEST_F() 237 EXPECT_TRUE(StorageManager::hasConfigMetricsReport(ConfigKey(kCallingUid, kConfigKey))); in TEST_F() 255 /*configKey=*/kConfigKey, /*configPackage=*/configPackageName, in TEST_F() 285 service->setRestrictedMetricsChangedOperation(kConfigKey, configPackageName, pir, delegateUid, in TEST_F() 327 service->removeRestrictedMetricsChangedOperation(kConfigKey, configPackageName, delegateUid); in TEST_F() [all …]
|
/packages/modules/StatsD/statsd/tests/ |
D | StatsService_test.cpp | 71 const int kConfigKey = 12345; in TEST() local 74 config.set_id(kConfigKey); in TEST() 77 EXPECT_TRUE(service->addConfigurationChecked(kCallingUid, kConfigKey, in TEST() 79 service->removeConfiguration(kConfigKey, kCallingUid); in TEST() 80 ConfigKey configKey(kCallingUid, kConfigKey); in TEST() 91 const int kConfigKey = 12345; in TEST() local 93 EXPECT_TRUE(service->addConfigurationChecked(kCallingUid, kConfigKey, in TEST() 95 service->removeConfiguration(kConfigKey, kCallingUid); in TEST() 96 ConfigKey configKey(kCallingUid, kConfigKey); in TEST() 161 config.set_id(kConfigKey); in TEST_F() [all …]
|
D | MetricsManager_test.cpp | 53 const ConfigKey kConfigKey(0, kConfigId); variable 118 EXPECT_CALL(*pullerManager, RegisterPullUidProvider(kConfigKey, _)).Times(1); in TEST() 119 EXPECT_CALL(*pullerManager, UnregisterPullUidProvider(kConfigKey, _)).Times(1); in TEST() 142 MetricsManager metricsManager(kConfigKey, config, timeBaseSec, timeBaseSec, uidMap, in TEST() 189 EXPECT_CALL(*pullerManager, RegisterPullUidProvider(kConfigKey, _)).Times(1); in TEST() 190 EXPECT_CALL(*pullerManager, UnregisterPullUidProvider(kConfigKey, _)).Times(1); in TEST() 210 MetricsManager metricsManager(kConfigKey, config, timeBaseSec, timeBaseSec, uidMap, in TEST() 299 MetricsManager metricsManager(kConfigKey, config, timeBaseSec, timeBaseSec, uidMap, in TEST() 335 MetricsManager metricsManager(kConfigKey, config, timeBaseSec, timeBaseSec, uidMap, in TEST() 352 MetricsManager metricsManager(kConfigKey, config, timeBaseSec, timeBaseSec, uidMap, in TEST_P() [all …]
|
D | DataCorruptionReason_test.cpp | 41 const ConfigKey kConfigKey(0, kConfigId); variable 161 kConfigKey, config, kTimeBaseSec, kTimeBaseSec, uidMap, pullerManager, in SetUp() 319 kConfigKey, config, kTimeBaseSec, kTimeBaseSec, uidMap, pullerManager, in SetUp()
|
D | statsd_test_util.h | 129 const int kConfigKey = 789130123; // Randomly chosen variable 135 ConfigKey configKey(kCallingUid, kConfigKey); in SetUp() 136 service->removeConfiguration(kConfigKey, kCallingUid); in SetUp() 144 ConfigKey configKey(kCallingUid, kConfigKey); in TearDown() 145 service->removeConfiguration(kConfigKey, kCallingUid); in TearDown()
|
D | statsd_test_util.cpp | 40 return service->addConfiguration(kConfigKey, configAsVec, kCallingUid).isOk(); in sendConfig() 46 ConfigKey configKey(kCallingUid, kConfigKey); in getReports()
|
/packages/modules/StatsD/statsd/tests/anomaly/ |
D | AlarmTracker_test.cpp | 42 const ConfigKey kConfigKey(kConfigUid, kConfigId); 55 AlarmTracker tracker(startMillis, startMillis, alarm, kConfigKey, subscriberAlarmMonitor); in TEST() 113 AlarmTracker trackerRand(startMillis, startMillis, alarmRand, kConfigKey, in TEST() 123 AlarmTracker trackerAlways(startMillis, startMillis, alarmAlways, kConfigKey, in TEST() 134 AlarmTracker trackerNever(startMillis, startMillis, alarmNever, kConfigKey, in TEST() 173 SubscriberReporter::getInstance().setBroadcastSubscriber(kConfigKey, broadcastSubRandId, in TEST() 175 SubscriberReporter::getInstance().setBroadcastSubscriber(kConfigKey, broadcastSubAlwaysId, in TEST() 177 SubscriberReporter::getInstance().setBroadcastSubscriber(kConfigKey, broadcastSubNeverId, in TEST() 201 SubscriberReporter::getInstance().unsetBroadcastSubscriber(kConfigKey, broadcastSubRandId); in TEST() 202 SubscriberReporter::getInstance().unsetBroadcastSubscriber(kConfigKey, broadcastSubAlwaysId); in TEST() [all …]
|
D | AnomalyTracker_test.cpp | 42 const ConfigKey kConfigKey(kConfigUid, kConfigId); 132 AnomalyTracker anomalyTracker(alert, kConfigKey); in TEST() 277 AnomalyTracker anomalyTracker(alert, kConfigKey); in TEST() 417 AnomalyTracker anomalyTrackerRand(alertRand, kConfigKey); in TEST() 428 AnomalyTracker anomalyTrackerAlways(alertAlways, kConfigKey); in TEST() 439 AnomalyTracker anomalyTrackerNever(alertNever, kConfigKey); in TEST() 477 SubscriberReporter::getInstance().setBroadcastSubscriber(kConfigKey, broadcastSubRandId, in TEST() 479 SubscriberReporter::getInstance().setBroadcastSubscriber(kConfigKey, broadcastSubAlwaysId, in TEST() 481 SubscriberReporter::getInstance().setBroadcastSubscriber(kConfigKey, broadcastSubNeverId, in TEST() 509 SubscriberReporter::getInstance().unsetBroadcastSubscriber(kConfigKey, broadcastSubRandId); in TEST() [all …]
|
/packages/modules/StatsD/statsd/tests/metrics/ |
D | GaugeMetricProducer_test.cpp | 47 const ConfigKey kConfigKey(0, 12345); variable 105 GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST() 133 EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return()); in TEST() 134 EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return()); in TEST() 135 EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _)) in TEST() 146 GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST() 236 GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST_P() 321 EXPECT_CALL(*pullerManager, RegisterReceiver(tagId, kConfigKey, _, _, _)).WillOnce(Return()); in TEST_P() 322 EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillOnce(Return()); in TEST_P() 323 EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _)) in TEST_P() [all …]
|
D | OringDurationTracker_test.cpp | 39 const ConfigKey kConfigKey(0, 12345); variable 65 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, in TEST() 98 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() 131 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() 162 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() 207 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, in TEST() 247 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, in TEST() 286 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() 327 new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor); in TEST() 328 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() [all …]
|
D | MaxDurationTracker_test.cpp | 40 const ConfigKey kConfigKey(0, 12345); variable 67 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() 104 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() 140 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() 180 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, true, bucketStartTimeNs, in TEST() 227 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST() 275 new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor); in TEST() 276 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST() 335 new DurationAnomalyTracker(alert, kConfigKey, alarmMonitor); in TEST() 336 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, bucketStartTimeNs, in TEST() [all …]
|
D | DurationMetricProducer_test.cpp | 47 const ConfigKey kConfigKey(0, 12345); variable 77 kConfigKey, metric, -1 /*no condition*/, {}, -1 /*what index not needed*/, in TEST() 106 kConfigKey, metric, -1 /*no condition*/, {}, -1 /*what index not needed*/, in TEST() 150 kConfigKey, metric, 0 /* condition index */, {ConditionState::kUnknown}, in TEST() 209 kConfigKey, metric, 0 /* condition index */, {ConditionState::kUnknown}, in TEST() 258 kConfigKey, metric, -1 /* no condition */, {}, -1 /*what index not needed*/, in TEST_P() 323 kConfigKey, metric, -1 /* no condition */, {}, -1 /*what index not needed*/, in TEST_P() 389 kConfigKey, metric, -1 /* no condition */, {}, -1 /*what index not needed*/, in TEST_P() 438 kConfigKey, metric, -1 /* no condition */, {}, -1 /*what index not needed*/, in TEST_P() 494 kConfigKey, metric, -1 /* no condition */, {}, -1 /*what index not needed*/, in TEST_P() [all …]
|
D | CountMetricProducer_test.cpp | 43 const ConfigKey kConfigKey(0, 12345); variable 79 CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST() 100 CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST() 165 CountMetricProducer countProducer(kConfigKey, metric, 0, {ConditionState::kUnknown}, wizard, in TEST() 237 CountMetricProducer countProducer(kConfigKey, metric, 0 /*condition tracker index*/, in TEST() 277 CountMetricProducer countProducer(kConfigKey, metric, -1 /* no condition */, {}, wizard, in TEST_P() 346 CountMetricProducer countProducer(kConfigKey, metric, -1 /* no condition */, {}, wizard, in TEST_P() 408 CountMetricProducer countProducer(kConfigKey, metric, -1 /* no condition */, {}, wizard, in TEST() 477 CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST() 542 CountMetricProducer countProducer(kConfigKey, metric, -1 /* meaning no condition */, {}, wizard, in TEST()
|
D | EventMetricProducer_test.cpp | 40 const ConfigKey kConfigKey(0, 12345); variable 85 EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST_F() 123 EventMetricProducer eventProducer(kConfigKey, metric, 0 /*condition index*/, in TEST_F() 181 EventMetricProducer eventProducer(kConfigKey, metric, 0 /*condition index*/, in TEST_F() 220 EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST_F() 273 EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST_F() 323 EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST_F() 364 EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST_F() 471 EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST_F() 569 EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST_F() [all …]
|
D | NumericValueMetricProducer_test.cpp | 49 const ConfigKey kConfigKey(0, 12345); variable 183 pullerManager, metric, tagId, pullAtomId != -1, kConfigKey, protoHash, timeBaseNs, 301 EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _)) in TEST() 365 EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _)) in TEST_P() 426 EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _)) in TEST() 483 EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _)) in TEST() 536 EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _)) in TEST() 588 EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _)) in TEST() 726 EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, _, _)) in TEST_P() 780 EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _)) in TEST() [all …]
|
D | KllMetricProducer_test.cpp | 50 const ConfigKey kConfigKey(0, 12345); variable 121 TimeUnitToBucketSizeInMillisGuardrailed(kConfigKey.GetUid(), metric.bucket())); 142 kConfigKey, metric, protoHash, {/*pullAtomId=*/-1, /*pullerManager=*/nullptr},
|
/packages/modules/StatsD/statsd/tests/condition/ |
D | SimpleConditionTracker_test.cpp | 40 const ConfigKey kConfigKey(0, 12345); variable 136 SimpleConditionTracker conditionTracker(kConfigKey, StringToId("SCREEN_IS_ON"), protoHash, in TEST() 190 SimpleConditionTracker conditionTracker(kConfigKey, StringToId("SCREEN_IS_ON"), protoHash, in TEST() 244 SimpleConditionTracker conditionTracker(kConfigKey, StringToId("SCREEN_IS_ON"), protoHash, in TEST() 331 SimpleConditionTracker conditionTracker(kConfigKey, StringToId("SCREEN_IS_ON"), protoHash, in TEST() 406 SimpleConditionTracker conditionTracker(kConfigKey, StringToId(conditionName), protoHash, in TEST_P() 506 SimpleConditionTracker conditionTracker(kConfigKey, StringToId(conditionName), protoHash, in TEST() 602 SimpleConditionTracker conditionTracker(kConfigKey, StringToId(conditionName), protoHash, in TEST_P() 704 SimpleConditionTracker conditionTracker(kConfigKey, StringToId(conditionName), protoHash, in TEST() 750 SimpleConditionTracker conditionTracker(kConfigKey, StringToId(conditionName), protoHash, in TEST()
|
/packages/modules/StatsD/statsd/tests/metrics/parsing_utils/ |
D | metrics_manager_util_test.cpp | 55 const ConfigKey kConfigKey(0, kConfigId); variable 86 kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, in initConfig() 1544 {new CountMetricProducer(kConfigKey, metric, 0, {ConditionState::kUnknown}, wizard, in TEST_F() 1569 {new CountMetricProducer(kConfigKey, metric, 0, {ConditionState::kUnknown}, wizard, in TEST_F() 1595 {new CountMetricProducer(kConfigKey, metric, 0, {ConditionState::kUnknown}, wizard, in TEST_F() 1622 kConfigKey, metric, -1 /*no condition*/, {}, -1 /* what index not needed*/, in TEST_F()
|