diff options
author | Yabin Cui <yabinc@google.com> | 2015-04-20 18:07:17 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-04-23 14:45:23 -0700 |
commit | 323e945313b190373b3fcfe578e25ee8390a76d3 (patch) | |
tree | e5019d88e283415b0f3d6e14c1c91df740110145 /simpleperf/main.cpp | |
parent | 67d3abd7b26a741347b33402ad32f5c6735ca0bd (diff) | |
download | extras-323e945313b190373b3fcfe578e25ee8390a76d3.tar.gz |
Implement simpleperf stat subcommand.
Also add some simple unit-tests.
Change-Id: Ic30a2d4a879e028a8c82babbaf82e322fc49a838
Diffstat (limited to 'simpleperf/main.cpp')
-rw-r--r-- | simpleperf/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/simpleperf/main.cpp b/simpleperf/main.cpp index 017e4952..1f7c7daa 100644 --- a/simpleperf/main.cpp +++ b/simpleperf/main.cpp @@ -39,12 +39,12 @@ int main(int argc, char** argv) { LOG(ERROR) << "malformed command line: unknown command " << args[0]; return 1; } + std::string command_name = args[0]; args.erase(args.begin()); + + LOG(DEBUG) << "command '" << command_name << "' starts running"; bool result = command->Run(args); - if (result == true) { - LOG(DEBUG) << "run command " << args[0] << " successfully"; - } else { - LOG(DEBUG) << "run command " << args[0] << "unsuccessfully"; - } + LOG(DEBUG) << "command '" << command_name << "' " + << (result ? "finished successfully" : "failed"); return result ? 0 : 1; } |