summaryrefslogtreecommitdiff
path: root/cmds/statsd/src/StatsService.cpp
diff options
context:
space:
mode:
authorBill Peckham <bpeckham@google.com>2018-09-08 10:06:40 -0700
committerBill Peckham <bpeckham@google.com>2018-09-08 10:06:40 -0700
commita74879d25eb0e4ef53855b57181b038bca75d05f (patch)
tree2a1ef83944343e547bebeae9998b098557225070 /cmds/statsd/src/StatsService.cpp
parentb00720941bf751117cf02da40add144683ab51f1 (diff)
Merge QP1A.180823.001
Change-Id: Ia2d6fa811b3c57185c1975db603d59e6eaef73fc
Diffstat (limited to 'cmds/statsd/src/StatsService.cpp')
-rw-r--r--cmds/statsd/src/StatsService.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/cmds/statsd/src/StatsService.cpp b/cmds/statsd/src/StatsService.cpp
index 1119eb36c239..91d68ea81468 100644
--- a/cmds/statsd/src/StatsService.cpp
+++ b/cmds/statsd/src/StatsService.cpp
@@ -403,7 +403,7 @@ void StatsService::print_cmd_help(FILE* out) {
fprintf(out, "\n *Note: If both UID and NAME are omitted then all configs will\n");
fprintf(out, "\n be removed from memory and disk!\n");
fprintf(out, "\n");
- fprintf(out, "usage: adb shell cmd stats dump-report [UID] NAME [--proto]\n");
+ fprintf(out, "usage: adb shell cmd stats dump-report [UID] NAME [--include_current_bucket] [--proto]\n");
fprintf(out, " Dump all metric data for a configuration.\n");
fprintf(out, " UID The uid of the configuration. It is only possible to pass\n");
fprintf(out, " the UID parameter on eng builds. If UID is omitted the\n");
@@ -567,12 +567,17 @@ status_t StatsService::cmd_dump_report(FILE* out, FILE* err, const Vector<String
int argCount = args.size();
bool good = false;
bool proto = false;
+ bool includeCurrentBucket = false;
int uid;
string name;
if (!std::strcmp("--proto", args[argCount-1].c_str())) {
proto = true;
argCount -= 1;
}
+ if (!std::strcmp("--include_current_bucket", args[argCount-1].c_str())) {
+ includeCurrentBucket = true;
+ argCount -= 1;
+ }
if (argCount == 2) {
// Automatically pick the UID
uid = IPCThreadState::self()->getCallingUid();
@@ -600,7 +605,7 @@ status_t StatsService::cmd_dump_report(FILE* out, FILE* err, const Vector<String
if (good) {
vector<uint8_t> data;
mProcessor->onDumpReport(ConfigKey(uid, StrToInt64(name)), getElapsedRealtimeNs(),
- false /* include_current_bucket*/, ADB_DUMP, &data);
+ includeCurrentBucket, ADB_DUMP, &data);
if (proto) {
for (size_t i = 0; i < data.size(); i ++) {
fprintf(out, "%c", data[i]);
@@ -878,8 +883,8 @@ void StatsService::Startup() {
mConfigManager->Startup();
}
-void StatsService::OnLogEvent(LogEvent* event, bool reconnectionStarts) {
- mProcessor->OnLogEvent(event, reconnectionStarts);
+void StatsService::OnLogEvent(LogEvent* event) {
+ mProcessor->OnLogEvent(event);
}
Status StatsService::getData(int64_t key, const String16& packageName, vector<uint8_t>* output) {