Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: apps/benchmark/run_args.cc

Issue 1347063002: Teach `benchmark.mojo` to save the collected trace file to disk. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « apps/benchmark/run_args.h ('k') | mojo/devtools/common/mojo_benchmark » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/benchmark/run_args.cc
diff --git a/apps/benchmark/run_args.cc b/apps/benchmark/run_args.cc
index 1791470bf8cd4baa692ce3b878f2701a89f4b50f..aa21f9fd6e6658be05d766312e8a949f60bd9ce1 100644
--- a/apps/benchmark/run_args.cc
+++ b/apps/benchmark/run_args.cc
@@ -68,6 +68,13 @@ bool GetRunArgs(const std::vector<std::string>& input_args, RunArgs* result) {
}
result->duration = base::TimeDelta::FromSeconds(duration_int);
+ result->write_output_file = false;
+ if (command_line.HasSwitch("trace-output")) {
+ result->write_output_file = true;
+ result->output_file_path =
+ base::FilePath(command_line.GetSwitchValueASCII("trace-output"));
+ }
+
// All regular arguments (not switches, ie. not preceded by "--") describe
// measurements.
for (const std::string& measurement_spec : command_line.GetArgs()) {
« no previous file with comments | « apps/benchmark/run_args.h ('k') | mojo/devtools/common/mojo_benchmark » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698