| 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/int
erfaces/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. |
| (...skipping 54 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 ``` |
| 75 |
| 76 ## Dashboard |
| 77 |
| 78 `mojo_benchmark` supports uploading the results to an instance of a Catapult |
| 79 performance dashboard. In order to upload the results of a run to performance |
| 80 dashboard, pass the `--upload` flag along with required meta-data describing the |
| 81 data being uploaded: |
| 82 |
| 83 ```sh |
| 84 mojo_benchmark \ |
| 85 --upload \ |
| 86 --master-name my-master \ |
| 87 --bot-name my-bot \ |
| 88 --test-name my-test-suite |
| 89 --builder-name my-builder \ |
| 90 --build-number my-build |
| 91 --server-url http://my-server.example.com |
| 92 ``` |
| 93 |
| 94 If no `--server-url` is specified, the script assumes that a local instance of |
| 95 the dashboard is running at `http://localhost:8080`. The script assumes that the |
| 96 working directory from which it is called is a git repository and queries it to |
| 97 determine the sequential number identifying the revision (as the number of |
| 98 commits in the current branch in the repository). |
| 99 |
| 100 For more information refer to: |
| 101 |
| 102 - [Catapult project](https://github.com/catapult-project/catapult) |
| OLD | NEW |