1/ Change all "name" to id in statsD.
2/ Handle Subscription for alert.
3/ Support no_report_metric
Bug: 69522276
Test: all statsd unit tests passed.
Change-Id: I851b235f2d149b8602b0cad632d5bf541962f40a
diff --git a/cmds/statsd/src/matchers/LogMatchingTracker.h b/cmds/statsd/src/matchers/LogMatchingTracker.h
index 567944f..4f30a04 100644
--- a/cmds/statsd/src/matchers/LogMatchingTracker.h
+++ b/cmds/statsd/src/matchers/LogMatchingTracker.h
@@ -33,8 +33,8 @@
class LogMatchingTracker : public virtual RefBase {
public:
- LogMatchingTracker(const std::string& name, const int index)
- : mName(name), mIndex(index), mInitialized(false){};
+ LogMatchingTracker(const int64_t& id, const int index)
+ : mId(id), mIndex(index), mInitialized(false){};
virtual ~LogMatchingTracker(){};
@@ -48,7 +48,7 @@
// circle dependency.
virtual bool init(const std::vector<AtomMatcher>& allLogMatchers,
const std::vector<sp<LogMatchingTracker>>& allTrackers,
- const std::unordered_map<std::string, int>& matcherMap,
+ const std::unordered_map<int64_t, int>& matcherMap,
std::vector<bool>& stack) = 0;
// Called when a log event comes.
@@ -69,13 +69,13 @@
return mAtomIds;
}
- const std::string& getName() const {
- return mName;
+ const int64_t& getId() const {
+ return mId;
}
protected:
// Name of this matching. We don't really need the name, but it makes log message easy to debug.
- const std::string mName;
+ const int64_t mId;
// Index of this LogMatchingTracker in MetricsManager's container.
const int mIndex;