/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 | 60 eventMatcher->set_id(StringToId("SCREEN_IS_ON")); in buildGoodConfig() 70 eventMatcher->set_id(StringToId("SCREEN_IS_OFF")); in buildGoodConfig() 80 eventMatcher->set_id(StringToId("SCREEN_ON_OR_OFF")); in buildGoodConfig() 84 combination->add_matcher(StringToId("SCREEN_IS_ON")); in buildGoodConfig() 85 combination->add_matcher(StringToId("SCREEN_IS_OFF")); in buildGoodConfig() 89 metric->set_what(StringToId("SCREEN_IS_ON")); in buildGoodConfig() 110 eventMatcher->set_id(StringToId("SCREEN_IS_ON")); in buildCircleMatchers() 120 eventMatcher->set_id(StringToId("SCREEN_ON_OR_OFF")); in buildCircleMatchers() 124 combination->add_matcher(StringToId("SCREEN_IS_ON")); in buildCircleMatchers() 126 combination->add_matcher(StringToId("SCREEN_ON_OR_OFF")); in buildCircleMatchers() [all …]
|
D | statsd_test_util.cpp | 47 atom_matcher.set_id(StringToId(name)); in CreateSimpleAtomMatcher() 60 atom_matcher.set_id(StringToId(name)); in CreateScheduledJobStateChangedAtomMatcher() 81 atom_matcher.set_id(StringToId("ScreenBrightnessChanged")); in CreateScreenBrightnessChangedAtomMatcher() 89 atom_matcher.set_id(StringToId("UidProcessStateChanged")); in CreateUidProcessStateChangedAtomMatcher() 98 atom_matcher.set_id(StringToId(name)); in CreateWakelockStateChangedAtomMatcher() 118 atom_matcher.set_id(StringToId(name)); in CreateBatterySaverModeStateChangedAtomMatcher() 141 atom_matcher.set_id(StringToId(name)); in CreateBatteryStateChangedAtomMatcher() 163 atom_matcher.set_id(StringToId(name)); in CreateScreenStateChangedAtomMatcher() 185 atom_matcher.set_id(StringToId(name)); in CreateSyncStateChangedAtomMatcher() 205 atom_matcher.set_id(StringToId(name)); in CreateActivityForegroundStateChangedAtomMatcher() [all …]
|
D | UidMap_test.cpp | 192 ConfigKey config1(1, StringToId("config1")); in TEST() 222 ConfigKey config1(1, StringToId("config1")); in TEST() 250 ConfigKey config1(1, StringToId("config1")); in TEST() 290 ConfigKey config1(1, StringToId("config1")); in TEST() 291 ConfigKey config2(1, StringToId("config2")); in TEST() 359 ConfigKey config1(1, StringToId("config1")); in TEST() 390 ConfigKey config1(1, StringToId("config1")); in TEST()
|
D | statsd_test_util.h | 336 int64_t StringToId(const string& str);
|
/frameworks/base/cmds/statsd/benchmark/ |
D | metric_util.cpp | 25 atom_matcher.set_id(StringToId(name)); in CreateSimpleAtomMatcher() 34 atom_matcher.set_id(StringToId(name)); in CreateScheduledJobStateChangedAtomMatcher() 55 atom_matcher.set_id(StringToId("ScreenBrightnessChanged")); in CreateScreenBrightnessChangedAtomMatcher() 63 atom_matcher.set_id(StringToId("UidProcessStateChanged")); in CreateUidProcessStateChangedAtomMatcher() 72 atom_matcher.set_id(StringToId(name)); in CreateWakelockStateChangedAtomMatcher() 92 atom_matcher.set_id(StringToId(name)); in CreateScreenStateChangedAtomMatcher() 114 atom_matcher.set_id(StringToId(name)); in CreateSyncStateChangedAtomMatcher() 134 atom_matcher.set_id(StringToId(name)); in CreateActivityForegroundStateChangedAtomMatcher() 155 predicate.set_id(StringToId("ScheduledJobRunningPredicate")); in CreateScheduledJobPredicate() 156 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 | 136 int64_t StringToId(const string& str);
|
/frameworks/base/cmds/statsd/tests/condition/ |
D | SimpleConditionTracker_test.cpp | 46 simplePredicate.set_start(StringToId("WAKE_LOCK_ACQUIRE")); in getWakeLockHeldCondition() 47 simplePredicate.set_stop(StringToId("WAKE_LOCK_RELEASE")); in getWakeLockHeldCondition() 48 simplePredicate.set_stop_all(StringToId("RELEASE_ALL")); in getWakeLockHeldCondition() 110 outputKeyMap[StringToId(conditionName)] = dim; in getWakeLockQueryKey() 117 simplePredicate.set_start(StringToId("SCREEN_TURNED_ON")); in TEST() 118 simplePredicate.set_stop(StringToId("SCREEN_TURNED_OFF")); in TEST() 123 trackerNameIndexMap[StringToId("SCREEN_TURNED_ON")] = 0; in TEST() 124 trackerNameIndexMap[StringToId("SCREEN_TURNED_OFF")] = 1; in TEST() 126 SimpleConditionTracker conditionTracker(kConfigKey, StringToId("SCREEN_IS_ON"), in TEST() 171 simplePredicate.set_start(StringToId("SCREEN_TURNED_ON")); in TEST() [all …]
|
/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/metrics/ |
D | EventMetricProducer_test.cpp | 94 metric.set_condition(StringToId("SCREEN_ON")); in TEST() 135 metric.set_condition(StringToId("APP_IN_BACKGROUND_PER_UID_AND_SCREEN_ON")); in TEST() 137 link->set_condition(StringToId("APP_IN_BACKGROUND_PER_UID")); in TEST() 144 key1[StringToId("APP_IN_BACKGROUND_PER_UID")] = { in TEST() 150 key2[StringToId("APP_IN_BACKGROUND_PER_UID")] = { in TEST()
|
D | MaxDurationTracker_test.cpp | 201 conditionKey1[StringToId("APP_BACKGROUND")] = conditionDimKey; in TEST() 243 conditionKey1[StringToId("APP_BACKGROUND")] = conditionKey; in TEST() 291 conditionKey1[StringToId("APP_BACKGROUND")] = conditionKey; in TEST() 293 conditionKey2[StringToId("APP_BACKGROUND")] = getMockedDimensionKey(TagId, 4, "2"); in TEST() 376 conditionKey1[StringToId("APP_BACKGROUND")] = conditionKey; in TEST() 378 conditionKey2[StringToId("APP_BACKGROUND")] = getMockedDimensionKey(TagId, 4, "2"); in TEST()
|
D | CountMetricProducer_test.cpp | 156 metric.set_condition(StringToId("SCREEN_ON")); in TEST() 202 metric.set_condition(StringToId("APP_IN_BACKGROUND_PER_UID_AND_SCREEN_ON")); in TEST() 204 link->set_condition(StringToId("APP_IN_BACKGROUND_PER_UID")); in TEST() 215 key1[StringToId("APP_IN_BACKGROUND_PER_UID")] = { in TEST() 219 key2[StringToId("APP_IN_BACKGROUND_PER_UID")] = { in TEST()
|
D | OringDurationTracker_test.cpp | 185 key1[StringToId("APP_BACKGROUND")] = kConditionKey1; in TEST() 222 key1[StringToId("APP_BACKGROUND")] = kConditionKey1; in TEST() 263 key1[StringToId("APP_BACKGROUND")] = kConditionKey1; in TEST() 521 conkey[StringToId("APP_BACKGROUND")] = kConditionKey1; in TEST()
|
D | GaugeMetricProducer_test.cpp | 427 metric.set_condition(StringToId("SCREEN_ON")); in TEST() 499 metric.set_condition(StringToId("APP_DIED")); in TEST()
|
D | ValueMetricProducer_test.cpp | 208 metric.set_condition(StringToId("SCREEN_ON")); in createMetricWithCondition() 214 metric.add_slice_by_state(StringToId(state)); in createMetricWithState() 220 metric.set_condition(StringToId("SCREEN_ON")); in createMetricWithConditionAndState() 221 metric.add_slice_by_state(StringToId(state)); in createMetricWithConditionAndState() 2076 metric.set_condition(StringToId("SCREEN_ON")); in TEST() 2233 metric.set_condition(StringToId("SCREEN_ON")); in TEST() 2582 metric.set_condition(StringToId("SCREEN_ON")); in TEST()
|
/frameworks/base/cmds/statsd/tests/e2e/ |
D | ConfigTtl_e2e_test.cpp | 46 alert->set_id(StringToId("alert")); in CreateStatsdConfig()
|
D | ValueMetric_pull_e2e_test.cpp | 88 screenOnOnBatteryPredicate->set_id(StringToId("screenOnOnBatteryPredicate")); in CreateStatsdConfigWithStates() 94 screenOffOnBatteryPredicate->set_id(StringToId("ScreenOffOnBattery")); in CreateStatsdConfigWithStates() 117 valueMetric2->set_id(StringToId("ValueMetricSubsystemSleepWhileScreenOffOnBattery")); in CreateStatsdConfigWithStates() 129 valueMetric3->set_id(StringToId("ValueMetricSubsystemSleepWhileOnBatterySliceScreen")); in CreateStatsdConfigWithStates()
|
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 | DurationMetric_e2e_test.cpp | 385 durationMetric->set_id(StringToId("WakelockDuration")); in TEST() 477 durationMetric->set_id(StringToId("WakelockDuration")); in TEST() 582 durationMetric->set_id(StringToId("WakelockDuration")); in TEST() 741 durationMetric->set_id(StringToId("DurationBatterySaverModeSliceScreen")); in TEST() 889 durationMetric->set_id(StringToId("DurationBatterySaverModeOnBatterySliceScreen")); in TEST() 1048 durationMetric->set_id(StringToId("DurationBatterySaverModeSliceScreenMapped")); in TEST() 1194 durationMetric->set_id(StringToId("DurationHoldingWakelockSliceUidProcessState")); in TEST() 1238 durationMetric->set_id(StringToId("DurationPartialWakelockPerTagUidSliceProcessState")); in TEST()
|
D | MetricConditionLink_e2e_test.cpp | 63 combinationPredicate->set_id(StringToId("combinationPredicate")); in CreateStatsdConfig() 70 countMetric->set_id(StringToId("AppCrashes")); in CreateStatsdConfig()
|
D | CountMetric_e2e_test.cpp | 59 screenOnOnBatteryPredicate->set_id(StringToId("screenOnOnBatteryPredicate")); in TEST() 66 countMetric1->set_id(StringToId("CountSyncStartWhileScreenOnOnBattery")); in TEST() 73 countMetric2->set_id(StringToId("CountSyncStartWhileOnBatterySliceScreen")); in TEST()
|
D | WakelockDuration_e2e_test.cpp | 52 durationMetric->set_id(StringToId("WakelockDuration")); in CreateStatsdConfig()
|
D | Anomaly_count_e2e_test.cpp | 47 alert->set_id(StringToId("alert")); in CreateStatsdConfig()
|
D | PartialBucket_e2e_test.cpp | 65 countMetric->set_id(StringToId("AppCrashes")); in MakeConfig()
|