/frameworks/base/cmds/statsd/tests/ |
D | ConfigManager_test.cpp | 92 EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(1, StringToId("zzz")), in TEST() 95 manager->UpdateConfig(ConfigKey(1, StringToId("zzz")), config91); in TEST() 98 EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(1, StringToId("zzz")), in TEST() 101 manager->UpdateConfig(ConfigKey(1, StringToId("zzz")), config92); in TEST() 104 EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(1, StringToId("yyy")), in TEST() 107 manager->UpdateConfig(ConfigKey(1, StringToId("yyy")), config93); in TEST() 110 EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(2, StringToId("zzz")), in TEST() 113 manager->UpdateConfig(ConfigKey(2, StringToId("zzz")), config94); in TEST() 116 EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(1, StringToId("yyy")))) in TEST() 118 manager->RemoveConfig(ConfigKey(1, StringToId("yyy"))); in TEST() [all …]
|
D | MetricsManager_test.cpp | 51 eventMatcher->set_id(StringToId("SCREEN_IS_ON")); in buildGoodConfig() 61 eventMatcher->set_id(StringToId("SCREEN_IS_OFF")); in buildGoodConfig() 71 eventMatcher->set_id(StringToId("SCREEN_ON_OR_OFF")); in buildGoodConfig() 75 combination->add_matcher(StringToId("SCREEN_IS_ON")); in buildGoodConfig() 76 combination->add_matcher(StringToId("SCREEN_IS_OFF")); in buildGoodConfig() 80 metric->set_what(StringToId("SCREEN_IS_ON")); in buildGoodConfig() 101 eventMatcher->set_id(StringToId("SCREEN_IS_ON")); in buildCircleMatchers() 111 eventMatcher->set_id(StringToId("SCREEN_ON_OR_OFF")); in buildCircleMatchers() 115 combination->add_matcher(StringToId("SCREEN_IS_ON")); in buildCircleMatchers() 117 combination->add_matcher(StringToId("SCREEN_ON_OR_OFF")); in buildCircleMatchers() [all …]
|
D | statsd_test_util.cpp | 24 atom_matcher.set_id(StringToId(name)); in CreateSimpleAtomMatcher() 37 atom_matcher.set_id(StringToId(name)); in CreateScheduledJobStateChangedAtomMatcher() 58 atom_matcher.set_id(StringToId("ScreenBrightnessChanged")); in CreateScreenBrightnessChangedAtomMatcher() 66 atom_matcher.set_id(StringToId("UidProcessStateChanged")); in CreateUidProcessStateChangedAtomMatcher() 75 atom_matcher.set_id(StringToId(name)); in CreateWakelockStateChangedAtomMatcher() 95 atom_matcher.set_id(StringToId(name)); in CreateBatterySaverModeStateChangedAtomMatcher() 119 atom_matcher.set_id(StringToId(name)); in CreateScreenStateChangedAtomMatcher() 142 atom_matcher.set_id(StringToId(name)); in CreateSyncStateChangedAtomMatcher() 162 atom_matcher.set_id(StringToId(name)); in CreateActivityForegroundStateChangedAtomMatcher() 184 atom_matcher.set_id(StringToId(name)); in CreateProcessLifeCycleStateChangedAtomMatcher() [all …]
|
D | UidMap_test.cpp | 198 ConfigKey config1(1, StringToId("config1")); in TEST() 228 ConfigKey config1(1, StringToId("config1")); in TEST() 256 ConfigKey config1(1, StringToId("config1")); in TEST() 296 ConfigKey config1(1, StringToId("config1")); in TEST() 297 ConfigKey config2(1, StringToId("config2")); in TEST() 365 ConfigKey config1(1, StringToId("config1")); in TEST() 396 ConfigKey config1(1, StringToId("config1")); in TEST()
|
D | statsd_test_util.h | 189 int64_t StringToId(const string& str);
|
/frameworks/base/cmds/statsd/benchmark/ |
D | metric_util.cpp | 23 atom_matcher.set_id(StringToId(name)); in CreateSimpleAtomMatcher() 32 atom_matcher.set_id(StringToId(name)); in CreateScheduledJobStateChangedAtomMatcher() 53 atom_matcher.set_id(StringToId("ScreenBrightnessChanged")); in CreateScreenBrightnessChangedAtomMatcher() 61 atom_matcher.set_id(StringToId("UidProcessStateChanged")); in CreateUidProcessStateChangedAtomMatcher() 70 atom_matcher.set_id(StringToId(name)); in CreateWakelockStateChangedAtomMatcher() 90 atom_matcher.set_id(StringToId(name)); in CreateScreenStateChangedAtomMatcher() 112 atom_matcher.set_id(StringToId(name)); in CreateSyncStateChangedAtomMatcher() 132 atom_matcher.set_id(StringToId(name)); in CreateActivityForegroundStateChangedAtomMatcher() 153 predicate.set_id(StringToId("ScheduledJobRunningPredicate")); in CreateScheduledJobPredicate() 154 predicate.mutable_simple_predicate()->set_start(StringToId("ScheduledJobStart")); in CreateScheduledJobPredicate() [all …]
|
D | duration_metric_benchmark.cpp | 59 combinationPredicate->set_id(StringToId("CombinationPredicate")); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 66 metric->set_id(StringToId("scheduledJob")); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 108 combinationPredicate->set_id(StringToId("CombinationPredicate")); in CreateDurationMetricConfig_Link_AND_CombinationCondition() 115 metric->set_id(StringToId("scheduledJob")); in CreateDurationMetricConfig_Link_AND_CombinationCondition()
|
D | metric_util.h | 157 int64_t StringToId(const string& str);
|
/frameworks/base/cmds/statsd/tests/guardrail/ |
D | StatsdStats_test.cpp | 110 stats.noteMatcherMatched(key, StringToId("matcher1")); in TEST() 111 stats.noteMatcherMatched(key, StringToId("matcher1")); in TEST() 112 stats.noteMatcherMatched(key, StringToId("matcher2")); in TEST() 114 stats.noteConditionDimensionSize(key, StringToId("condition1"), 250); in TEST() 115 stats.noteConditionDimensionSize(key, StringToId("condition1"), 240); in TEST() 117 stats.noteMetricDimensionSize(key, StringToId("metric1"), 201); in TEST() 118 stats.noteMetricDimensionSize(key, StringToId("metric1"), 202); in TEST() 120 stats.noteAnomalyDeclared(key, StringToId("alert1")); in TEST() 121 stats.noteAnomalyDeclared(key, StringToId("alert1")); in TEST() 122 stats.noteAnomalyDeclared(key, StringToId("alert2")); in TEST() [all …]
|
/frameworks/base/cmds/statsd/tests/condition/ |
D | SimpleConditionTracker_test.cpp | 43 simplePredicate.set_start(StringToId("WAKE_LOCK_ACQUIRE")); in getWakeLockHeldCondition() 44 simplePredicate.set_stop(StringToId("WAKE_LOCK_RELEASE")); in getWakeLockHeldCondition() 45 simplePredicate.set_stop_all(StringToId("RELEASE_ALL")); in getWakeLockHeldCondition() 107 outputKeyMap[StringToId(conditionName)] = dim; in getWakeLockQueryKey() 114 simplePredicate.set_start(StringToId("SCREEN_TURNED_ON")); in TEST() 115 simplePredicate.set_stop(StringToId("SCREEN_TURNED_OFF")); in TEST() 120 trackerNameIndexMap[StringToId("SCREEN_TURNED_ON")] = 0; in TEST() 121 trackerNameIndexMap[StringToId("SCREEN_TURNED_OFF")] = 1; in TEST() 123 …SimpleConditionTracker conditionTracker(kConfigKey, StringToId("SCREEN_IS_ON"), 0 /*tracker index*… in TEST() 199 simplePredicate.set_start(StringToId("SCREEN_TURNED_ON")); in TEST() [all …]
|
D | StateTracker_test.cpp | 37 simplePredicate.set_start(StringToId("UidProcState")); in getUidProcStatePredicate() 60 trackerNameIndexMap[StringToId("UidProcState")] = 0; in TEST()
|
/frameworks/base/cmds/statsd/tests/metrics/ |
D | EventMetricProducer_test.cpp | 68 metric.set_condition(StringToId("SCREEN_ON")); in TEST() 97 metric.set_condition(StringToId("APP_IN_BACKGROUND_PER_UID_AND_SCREEN_ON")); in TEST() 99 link->set_condition(StringToId("APP_IN_BACKGROUND_PER_UID")); in TEST() 107 … key1[StringToId("APP_IN_BACKGROUND_PER_UID")] = {getMockedDimensionKey(conditionTagId, 2, "111")}; in TEST() 113 … key2[StringToId("APP_IN_BACKGROUND_PER_UID")] = {getMockedDimensionKey(conditionTagId, 2, "222")}; in TEST()
|
D | MaxDurationTracker_test.cpp | 210 conditionKey1[StringToId("APP_BACKGROUND")] = conditionDimKey; in TEST() 254 conditionKey1[StringToId("APP_BACKGROUND")] = conditionKey; in TEST() 303 conditionKey1[StringToId("APP_BACKGROUND")] = conditionKey; in TEST() 305 conditionKey2[StringToId("APP_BACKGROUND")] = getMockedDimensionKey(TagId, 4, "2"); in TEST() 389 conditionKey1[StringToId("APP_BACKGROUND")] = conditionKey; in TEST() 391 conditionKey2[StringToId("APP_BACKGROUND")] = getMockedDimensionKey(TagId, 4, "2"); in TEST()
|
D | CountMetricProducer_test.cpp | 124 metric.set_condition(StringToId("SCREEN_ON")); in TEST() 169 metric.set_condition(StringToId("APP_IN_BACKGROUND_PER_UID_AND_SCREEN_ON")); in TEST() 171 link->set_condition(StringToId("APP_IN_BACKGROUND_PER_UID")); in TEST() 179 key1[StringToId("APP_IN_BACKGROUND_PER_UID")] = in TEST() 186 key2[StringToId("APP_IN_BACKGROUND_PER_UID")] = in TEST()
|
D | OringDurationTracker_test.cpp | 193 key1[StringToId("APP_BACKGROUND")] = kConditionKey1; in TEST() 231 key1[StringToId("APP_BACKGROUND")] = kConditionKey1; in TEST() 273 key1[StringToId("APP_BACKGROUND")] = kConditionKey1; in TEST() 537 conkey[StringToId("APP_BACKGROUND")] = kConditionKey1; in TEST()
|
/frameworks/base/cmds/statsd/tests/e2e/ |
D | ConfigTtl_e2e_test.cpp | 46 alert->set_id(StringToId("alert")); in CreateStatsdConfig()
|
D | DimensionInCondition_e2e_combination_AND_cond_test.cpp | 63 combinationPredicate->set_id(StringToId("CombinationPredicate")); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 70 metric->set_id(StringToId("scheduledJob")); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 428 combinationPredicate->set_id(StringToId("CombinationPredicate")); in CreateDurationMetricConfig_Link_AND_CombinationCondition() 435 metric->set_id(StringToId("scheduledJob")); in CreateDurationMetricConfig_Link_AND_CombinationCondition() 675 combinationPredicate->set_id(StringToId("CombinationPredicate")); in CreateDurationMetricConfig_PartialLink_AND_CombinationCondition() 682 metric->set_id(StringToId("scheduledJob")); in CreateDurationMetricConfig_PartialLink_AND_CombinationCondition()
|
D | Anomaly_duration_sum_e2e_test.cpp | 55 durationMetric->set_id(StringToId("WakelockDuration")); in CreateStatsdConfig() 64 alert->set_id(StringToId("alert")); in CreateStatsdConfig() 65 alert->set_metric_id(StringToId("WakelockDuration")); in CreateStatsdConfig()
|
D | MetricConditionLink_e2e_test.cpp | 63 combinationPredicate->set_id(StringToId("combinationPredicate")); in CreateStatsdConfig() 70 countMetric->set_id(StringToId("AppCrashes")); in CreateStatsdConfig()
|
D | DimensionInCondition_e2e_combination_OR_cond_test.cpp | 58 metric->set_id(StringToId("ScreenBrightnessChangeMetric")); in CreateCountMetric_NoLink_CombinationCondition_Config() 262 metric->set_id(StringToId("AppCrashMetric")); in CreateCountMetric_Link_CombinationCondition() 457 metric->set_id(StringToId("BatterySaverModeDurationMetric")); in CreateDurationMetricConfig_NoLink_CombinationCondition() 652 metric->set_id(StringToId("AppInBackgroundMetric")); in CreateDurationMetricConfig_Link_CombinationCondition()
|
D | DurationMetric_e2e_test.cpp | 382 durationMetric->set_id(StringToId("WakelockDuration")); in TEST() 468 durationMetric->set_id(StringToId("WakelockDuration")); in TEST() 571 durationMetric->set_id(StringToId("WakelockDuration")); in TEST()
|
D | DimensionInCondition_e2e_simple_cond_test.cpp | 58 metric->set_id(StringToId("scheduledJob")); in CreateDurationMetricConfig_NoLink_SimpleCondition() 339 metric->set_id(StringToId("scheduledJob")); in createDurationMetric_Link_SimpleConditionConfig() 561 metric->set_id(StringToId("scheduledJob")); in createDurationMetric_PartialLink_SimpleConditionConfig()
|
D | Anomaly_count_e2e_test.cpp | 46 alert->set_id(StringToId("alert")); in CreateStatsdConfig()
|
D | PartialBucket_e2e_test.cpp | 63 countMetric->set_id(StringToId("AppCrashes")); in MakeConfig()
|
D | WakelockDuration_e2e_test.cpp | 52 durationMetric->set_id(StringToId("WakelockDuration")); in CreateStatsdConfig()
|