1/ Support nested message and repeated fields in statsd.
2/ Filter gauge fields by FieldMatcher.
3/ Wire up wakelock attribution chain.
4/ e2e test: wakelock duration metric with aggregated predicate dimensions.
5/ e2e test: count metric with multiple metric condition links for 2 predicates and 1 non-sliced predicate.
Test: statsd unit test passed.
Change-Id: I89db31cb068184a54e0a892fad710966d3127bc9
diff --git a/cmds/statsd/src/matchers/SimpleLogMatchingTracker.cpp b/cmds/statsd/src/matchers/SimpleLogMatchingTracker.cpp
index ac217ab..91ef034 100644
--- a/cmds/statsd/src/matchers/SimpleLogMatchingTracker.cpp
+++ b/cmds/statsd/src/matchers/SimpleLogMatchingTracker.cpp
@@ -30,12 +30,13 @@
SimpleLogMatchingTracker::SimpleLogMatchingTracker(const string& name, const int index,
- const SimpleAtomMatcher& matcher)
- : LogMatchingTracker(name, index), mMatcher(matcher) {
- if (!matcher.has_tag()) {
+ const SimpleAtomMatcher& matcher,
+ const UidMap& uidMap)
+ : LogMatchingTracker(name, index), mMatcher(matcher), mUidMap(uidMap) {
+ if (!matcher.has_atom_id()) {
mInitialized = false;
} else {
- mTagIds.insert(matcher.tag());
+ mAtomIds.insert(matcher.atom_id());
mInitialized = true;
}
}
@@ -59,12 +60,12 @@
return;
}
- if (mTagIds.find(event.GetTagId()) == mTagIds.end()) {
+ if (mAtomIds.find(event.GetTagId()) == mAtomIds.end()) {
matcherResults[mIndex] = MatchingState::kNotMatched;
return;
}
- bool matched = matchesSimple(mMatcher, event);
+ bool matched = matchesSimple(mUidMap, mMatcher, event);
matcherResults[mIndex] = matched ? MatchingState::kMatched : MatchingState::kNotMatched;
VLOG("Stats SimpleLogMatcher %s matched? %d", mName.c_str(), matched);
}