OLD | NEW |
1 # mojo_benchmark | 1 # mojo_benchmark |
2 | 2 |
3 `mojo_benchmark` allows you to run performance tests for any Mojo application | 3 `mojo_benchmark` allows you to run performance tests for any Mojo application |
4 that participates in the [tracing | 4 that participates in the [tracing |
5 ecosystem](https://github.com/domokit/mojo/blob/master/mojo/services/tracing/pub
lic/interfaces/tracing.mojom) | 5 ecosystem](https://github.com/domokit/mojo/blob/master/mojo/services/tracing/int
erfaces/tracing.mojom) |
6 with no app changes required. | 6 with no app changes required. |
7 | 7 |
8 The script reads a list of benchmarks to run from a file, runs each benchmark in | 8 The script reads a list of benchmarks to run from a file, runs each benchmark in |
9 controlled caching conditions with tracing enabled and performs specified | 9 controlled caching conditions with tracing enabled and performs specified |
10 measurements on the collected trace data. | 10 measurements on the collected trace data. |
11 | 11 |
12 ## Defining benchmarks | 12 ## Defining benchmarks |
13 | 13 |
14 `mojo_benchmark` runs performance tests defined in a benchmark file. The | 14 `mojo_benchmark` runs performance tests defined in a benchmark file. The |
15 benchmark file is a Python dictionary of the following format: | 15 benchmark file is a Python dictionary of the following format: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 { | 65 { |
66 'name': 'My app initialization', | 66 'name': 'My app initialization', |
67 'app': 'https://my_domain/my_app.mojo', | 67 'app': 'https://my_domain/my_app.mojo', |
68 'duration': 10, | 68 'duration': 10, |
69 'measurements': [ | 69 'measurements': [ |
70 'time_until/my_app/initialized', | 70 'time_until/my_app/initialized', |
71 ], | 71 ], |
72 }, | 72 }, |
73 ] | 73 ] |
74 ``` | 74 ``` |
OLD | NEW |