Reduce statsd binary size from 730KB-> 664KB
1. StatsdStats does not use the proto object in memory anymore.
2. lite_static -> lite
3. don't use sstream
Bug: 72129300
Test: statsd_test
Change-Id: I8a5adaf222d4d5034e8bf115215fb6dd5f042cac
diff --git a/cmds/statsd/src/config/ConfigKey.cpp b/cmds/statsd/src/config/ConfigKey.cpp
index d791f86..4a2bd27 100644
--- a/cmds/statsd/src/config/ConfigKey.cpp
+++ b/cmds/statsd/src/config/ConfigKey.cpp
@@ -16,14 +16,10 @@
#include "config/ConfigKey.h"
-#include <sstream>
-
namespace android {
namespace os {
namespace statsd {
-using std::ostringstream;
-
ConfigKey::ConfigKey() {
}
@@ -37,9 +33,9 @@
}
string ConfigKey::ToString() const {
- ostringstream out;
- out << '(' << mUid << ',' << mId << ')';
- return out.str();
+ string s;
+ s += "(" + std::to_string(mUid) + " " + std::to_string(mId) + ")";
+ return s;
}