Allow duration of some commands to be logged.
BUG: 137580007
Test: bugreport contains duration for (EVENT LOG, STATS LOG, RADIO LOG).
But does not contain duration for other quick running commands.
Change-Id: I771a79052f4a6522ad98b22d4a49331d7ac59584
diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h
index f137fc9..c059641 100644
--- a/cmds/dumpstate/dumpstate.h
+++ b/cmds/dumpstate/dumpstate.h
@@ -73,13 +73,15 @@
*/
class DurationReporter {
public:
- explicit DurationReporter(const std::string& title, bool logcat_only = false);
+ explicit DurationReporter(const std::string& title, bool logcat_only = false,
+ bool verbose = false);
~DurationReporter();
private:
std::string title_;
bool logcat_only_;
+ bool verbose_;
uint64_t started_;
DISALLOW_COPY_AND_ASSIGN(DurationReporter);
@@ -224,7 +226,8 @@
*/
int RunCommand(const std::string& title, const std::vector<std::string>& fullCommand,
const android::os::dumpstate::CommandOptions& options =
- android::os::dumpstate::CommandOptions::DEFAULT);
+ android::os::dumpstate::CommandOptions::DEFAULT,
+ bool verbose_duration = false);
/*
* Runs `dumpsys` with the given arguments, automatically setting its timeout