Save dumpstate duration stats so it can be tuned over time.
Fixes: 26373682
Test: dumpstate_test passes and manual verification
Change-Id: I72a308bfb314e157b12746c1be2c33833bdf9d8a
diff --git a/cmds/dumpstate/DumpstateService.cpp b/cmds/dumpstate/DumpstateService.cpp
index ce78ec6..a2a9018 100644
--- a/cmds/dumpstate/DumpstateService.cpp
+++ b/cmds/dumpstate/DumpstateService.cpp
@@ -69,9 +69,10 @@
}
status_t DumpstateService::dump(int fd, const Vector<String16>&) {
- dprintf(fd, "id: %lu\n", ds_.id_);
+ dprintf(fd, "id: %d\n", ds_.id_);
dprintf(fd, "pid: %d\n", ds_.pid_);
- dprintf(fd, "progress: %d / %d\n", ds_.progress_, ds_.weight_total_);
+ dprintf(fd, "progress:\n");
+ ds_.progress_->Dump(fd, " ");
dprintf(fd, "args: %s\n", ds_.args_.c_str());
dprintf(fd, "extra_options: %s\n", ds_.extra_options_.c_str());
dprintf(fd, "version: %s\n", ds_.version_.c_str());
@@ -79,7 +80,8 @@
dprintf(fd, "screenshot_path: %s\n", ds_.screenshot_path_.c_str());
dprintf(fd, "log_path: %s\n", ds_.log_path_.c_str());
dprintf(fd, "tmp_path: %s\n", ds_.tmp_path_.c_str());
- dprintf(fd, "path: %s\n", ds_.extra_options_.c_str());
+ dprintf(fd, "path: %s\n", ds_.path_.c_str());
+ dprintf(fd, "extra_options: %s\n", ds_.extra_options_.c_str());
dprintf(fd, "base_name: %s\n", ds_.base_name_.c_str());
dprintf(fd, "name: %s\n", ds_.name_.c_str());
dprintf(fd, "now: %ld\n", ds_.now_);