/frameworks/base/cmds/statsd/tests/condition/ |
D | SimpleConditionTracker_test.cpp | 132 vector<ConditionState> conditionCache(1, ConditionState::kNotEvaluated); in TEST() local 135 conditionTracker.isConditionMet(queryKey, allPredicates, false, conditionCache); in TEST() 136 EXPECT_EQ(ConditionState::kFalse, conditionCache[0]); in TEST() 148 conditionCache[0] = ConditionState::kNotEvaluated; in TEST() 149 conditionTracker.evaluateCondition(*screenOffEvent, matcherState, allPredicates, conditionCache, in TEST() 151 EXPECT_EQ(ConditionState::kFalse, conditionCache[0]); in TEST() 161 conditionCache[0] = ConditionState::kNotEvaluated; in TEST() 163 conditionTracker.evaluateCondition(*screenOnEvent, matcherState, allPredicates, conditionCache, in TEST() 165 EXPECT_EQ(ConditionState::kTrue, conditionCache[0]); in TEST() 186 vector<ConditionState> conditionCache(1, ConditionState::kNotEvaluated); in TEST() local [all …]
|
/frameworks/base/cmds/statsd/src/condition/ |
D | SimpleConditionTracker.cpp | 122 void SimpleConditionTracker::handleStopAll(std::vector<ConditionState>& conditionCache, in handleStopAll() argument 139 conditionCache[mIndex] = ConditionState::kFalse; in handleStopAll() 162 bool matchStart, ConditionState* conditionCache, in handleConditionEvent() argument 170 (*conditionCache) = ConditionState::kUnknown; in handleConditionEvent() 237 (*conditionCache) = newCondition; in handleConditionEvent() 247 vector<ConditionState>& conditionCache, in evaluateCondition() argument 249 if (conditionCache[mIndex] != ConditionState::kNotEvaluated) { in evaluateCondition() 252 (long long)mConditionId, conditionCache[mIndex]); in evaluateCondition() 260 handleStopAll(conditionCache, conditionChangedCache); in evaluateCondition() 283 conditionCache[mIndex] = mInitialValue; in evaluateCondition() [all …]
|
D | CombinationConditionTracker.cpp | 115 vector<ConditionState>& conditionCache) const { in isConditionMet() 118 if (conditionCache[childIndex] == ConditionState::kNotEvaluated) { in isConditionMet() 121 conditionCache); in isConditionMet() 124 conditionCache[mIndex] = in isConditionMet() 125 evaluateCombinationCondition(mChildren, mLogicalOperation, conditionCache); in isConditionMet()
|
D | condition_util.cpp | 35 const std::vector<ConditionState>& conditionCache) { in evaluateCombinationCondition() argument 43 ConditionState childState = conditionCache[childIndex]; in evaluateCombinationCondition() 72 ((conditionCache[children[0]] == ConditionState::kFalse) ? in evaluateCombinationCondition()
|
D | SimpleConditionTracker.h | 46 std::vector<ConditionState>& conditionCache, 52 std::vector<ConditionState>& conditionCache) const override; 119 void handleStopAll(std::vector<ConditionState>& conditionCache, 123 ConditionState* conditionCache, bool* changedCache);
|
D | CombinationConditionTracker.h | 41 std::vector<ConditionState>& conditionCache, 47 std::vector<ConditionState>& conditionCache) const override;
|
D | ConditionTracker.h | 74 std::vector<ConditionState>& conditionCache, 89 std::vector<ConditionState>& conditionCache) const = 0;
|
D | condition_util.h | 39 const std::vector<ConditionState>& conditionCache);
|
/frameworks/base/cmds/statsd/tests/ |
D | MetricsManager_test.cpp | 414 vector<ConditionState> conditionCache(5, ConditionState::kNotEvaluated); in TEST() local 416 allConditionTrackers[3]->isConditionMet(queryKey, allConditionTrackers, false, conditionCache); in TEST() 417 allConditionTrackers[4]->isConditionMet(queryKey, allConditionTrackers, false, conditionCache); in TEST() 418 EXPECT_EQ(ConditionState::kUnknown, conditionCache[0]); in TEST() 419 EXPECT_EQ(ConditionState::kFalse, conditionCache[1]); in TEST() 420 EXPECT_EQ(ConditionState::kFalse, conditionCache[2]); in TEST() 421 EXPECT_EQ(ConditionState::kFalse, conditionCache[3]); in TEST() 422 EXPECT_EQ(ConditionState::kUnknown, conditionCache[4]); in TEST()
|
/frameworks/base/cmds/statsd/src/metrics/ |
D | MetricsManager.cpp | 543 vector<ConditionState> conditionCache(mAllConditionTrackers.size(), in onLogEvent() local 552 condition->evaluateCondition(event, matcherCache, mAllConditionTrackers, conditionCache, in onLogEvent() 567 mAllMetricProducers[metricIndex]->onConditionChanged(conditionCache[i], in onLogEvent() 573 mAllMetricProducers[metricIndex]->onSlicedConditionMayChange(conditionCache[i], in onLogEvent()
|