Teach `benchmark.mojo` to save the collected trace file to disk.
This patch adds `--save-traces` argument to mojo_benchmark which saves
the traces collected in each benchmark run to disk.
A follow-up patch will need teach the runner to move these files to a
better location on the host machine (including from an Android device).
Fixes #417.
R=qsr@chromium.org
Review URL: https://codereview.chromium.org/1347063002 .
diff --git a/apps/benchmark/README.md b/apps/benchmark/README.md
index a8f6563..10da93e 100644
--- a/apps/benchmark/README.md
+++ b/apps/benchmark/README.md
@@ -8,12 +8,17 @@
## Arguments
-The benchmarking app expects the following arguments:
+The benchmarking app **requires** the following arguments:
- `--app=<app_url>` - url of the application to be benchmarked
- `--duration=<duration_seconds>` - duration of the benchmark in seconds
-any other arguments are assumed to be descriptions of measurements to be
+The following arguments are **optional**:
+
+ - `--trace-output=<output_file_path>` - local file path at which the collected trace
+ will be written
+
+Any other arguments are assumed to be descriptions of measurements to be
conducted on the collected trace data. Each measurement has to be of form:
`<measurement_type>/<trace_event_category>/<trace_event_name>`.
@@ -28,4 +33,4 @@
Devtools offers [a helper script](../../mojo/devtools/common/mojo_benchmark)
allowing to run a list of benchmarks in controlled caching conditions, both
-on Linux and Android.
+on **Android** and **Linux**.