| OLD | NEW |
| 1 # benchmark | 1 # benchmark |
| 2 | 2 |
| 3 This application connects to another mojo application, collects traces during | 3 This application connects to another mojo application, collects traces during |
| 4 indicated period of time and computes a number of results based on the collected | 4 indicated period of time and computes a number of results based on the collected |
| 5 traces. It can be used to measure performance of a mojo app, provided that the | 5 traces. It can be used to measure performance of a mojo app, provided that the |
| 6 app being benchmarked participates in the [tracing | 6 app being benchmarked participates in the [tracing |
| 7 ecosystem](../../mojo/services/tracing/public/interfaces/tracing.mojom). | 7 ecosystem](../../mojo/services/tracing/public/interfaces/tracing.mojom). |
| 8 | 8 |
| 9 ## Arguments | 9 ## Arguments |
| 10 | 10 |
| 11 The benchmarking app expects the following arguments: | 11 The benchmarking app **requires** the following arguments: |
| 12 | 12 |
| 13 - `--app=<app_url>` - url of the application to be benchmarked | 13 - `--app=<app_url>` - url of the application to be benchmarked |
| 14 - `--duration=<duration_seconds>` - duration of the benchmark in seconds | 14 - `--duration=<duration_seconds>` - duration of the benchmark in seconds |
| 15 | 15 |
| 16 any other arguments are assumed to be descriptions of measurements to be | 16 The following arguments are **optional**: |
| 17 |
| 18 - `--trace-output=<output_file_path>` - local file path at which the collected
trace |
| 19 will be written |
| 20 |
| 21 Any other arguments are assumed to be descriptions of measurements to be |
| 17 conducted on the collected trace data. Each measurement has to be of form: | 22 conducted on the collected trace data. Each measurement has to be of form: |
| 18 `<measurement_type>/<trace_event_category>/<trace_event_name>`. | 23 `<measurement_type>/<trace_event_category>/<trace_event_name>`. |
| 19 | 24 |
| 20 The following measurement types are available: | 25 The following measurement types are available: |
| 21 | 26 |
| 22 - `time_until` - measures time until the first occurence of the event named | 27 - `time_until` - measures time until the first occurence of the event named |
| 23 `trace_event_name` in category `trace_event_category`. | 28 `trace_event_name` in category `trace_event_category`. |
| 24 - `avg_duration` - measures average duration of all events named | 29 - `avg_duration` - measures average duration of all events named |
| 25 `trace_event_name` in category `trace_event_category`. | 30 `trace_event_name` in category `trace_event_category`. |
| 26 | 31 |
| 27 ## Runner script | 32 ## Runner script |
| 28 | 33 |
| 29 Devtools offers [a helper script](../../mojo/devtools/common/mojo_benchmark) | 34 Devtools offers [a helper script](../../mojo/devtools/common/mojo_benchmark) |
| 30 allowing to run a list of benchmarks in controlled caching conditions, both | 35 allowing to run a list of benchmarks in controlled caching conditions, both |
| 31 on Linux and Android. | 36 on **Android** and **Linux**. |
| OLD | NEW |