angular/contributing-docs/running-benchmarks.md
Jeremy Elbourn f0fbced1c5 docs: update and reorganize contributor docs (#56141)
* Move from `docs/` to `contributing-docs/`
* Updated file names to better communicate their content
* Consolidated content into fewer docs
* Updated and/or deleted obsolete info

PR Close #56141
2024-06-11 08:20:59 -07:00

35 lines
918 B
Markdown

## Benchmarks
- Benchmarks code can be found in: `/modules/benchmarks/src`.
- Benchmarks convenience script code in `/scripts/benchmarks`.
- Benchpress (the sample runner) in `/packages/benchpress`.
### Running benchmark
```
yarn benchmarks run
```
### Running a comparison with local changes
```
yarn benchmarks run-compare main
yarn benchmarks run-compare <compare-sha> [bazel-target]
```
If no benchmark target is specified, a prompt will allow you to select an available benchmark.
### Running a comparison in a PR
You can start a comparison by adding a comment as followed to any PR:
```
/benchmark-compare main //modules/benchmarks/src/expanding_rows:perf_chromium
```
```
/benchmark-compare <other-sha> //modules/benchmarks/src/expanding_rows:perf_chromium
```
**Note**: An explicit benchmark target must be provided. You can use the prompt
of `yarn benchmarks run` to discover available benchmarks.