Home
last modified time | relevance | path

Searched refs:conditionCache (Results 1 – 10 of 10) sorted by relevance

/frameworks/base/cmds/statsd/tests/condition/
DSimpleConditionTracker_test.cpp132 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/
DSimpleConditionTracker.cpp122 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 …]
DCombinationConditionTracker.cpp115 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()
Dcondition_util.cpp35 const std::vector<ConditionState>& conditionCache) { in evaluateCombinationCondition() argument
43 ConditionState childState = conditionCache[childIndex]; in evaluateCombinationCondition()
72 ((conditionCache[children[0]] == ConditionState::kFalse) ? in evaluateCombinationCondition()
DSimpleConditionTracker.h46 std::vector<ConditionState>& conditionCache,
52 std::vector<ConditionState>& conditionCache) const override;
119 void handleStopAll(std::vector<ConditionState>& conditionCache,
123 ConditionState* conditionCache, bool* changedCache);
DCombinationConditionTracker.h41 std::vector<ConditionState>& conditionCache,
47 std::vector<ConditionState>& conditionCache) const override;
DConditionTracker.h74 std::vector<ConditionState>& conditionCache,
89 std::vector<ConditionState>& conditionCache) const = 0;
Dcondition_util.h39 const std::vector<ConditionState>& conditionCache);
/frameworks/base/cmds/statsd/tests/
DMetricsManager_test.cpp414 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/
DMetricsManager.cpp543 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()