Add log source filtering in statsd to filter out spams.
+ Add log source whitelist in StatsdConfig
+ Some changes in UidMap API. Listener needs to be wp instead of sp.
+ Update dogfood app config to have log source
+ Increase the stats service thread pool size to 10 (9+1).
TODO: add unit tests(b/70805664). This unit test takes some time to write.
Test: statsd_test & manual
Change-Id: I129b1cc13db5114db7417580962bd7cc4438519d
diff --git a/cmds/statsd/src/metrics/MetricProducer.h b/cmds/statsd/src/metrics/MetricProducer.h
index d4a2195..7bd274d 100644
--- a/cmds/statsd/src/metrics/MetricProducer.h
+++ b/cmds/statsd/src/metrics/MetricProducer.h
@@ -27,6 +27,7 @@
#include <log/logprint.h>
#include <utils/RefBase.h>
+#include <unordered_map>
namespace android {
namespace os {
@@ -54,6 +55,18 @@
};
virtual ~MetricProducer(){};
+ void notifyAppUpgrade(const string& apk, const int uid, const int64_t version) override{
+ // TODO: Implement me.
+ };
+
+ void notifyAppRemoved(const string& apk, const int uid) override{
+ // TODO: Implement me.
+ };
+
+ void onUidMapReceived() override{
+ // TODO: Implement me.
+ };
+
// Consume the parsed stats log entry that already matched the "what" of the metric.
void onMatchedLogEvent(const size_t matcherIndex, const LogEvent& event) {
std::lock_guard<std::mutex> lock(mMutex);