mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
build: add documentation for running benchmarks
Adds documentation for running benchmarks.
This commit is contained in:
parent
28961e805f
commit
9a01ac3f49
2 changed files with 46 additions and 0 deletions
35
docs/BENCHMARKS.md
Normal file
35
docs/BENCHMARKS.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
## 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.
|
||||
11
scripts/benchmarks/README.md
Normal file
11
scripts/benchmarks/README.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
## Benchmarks script
|
||||
|
||||
This folder contains a convenience script for running benchmarks and performing comparisons. It can
|
||||
be run via `yarn benchmarks`. See command line help for possible commands.
|
||||
|
||||
The benchmark script is used in conjunction with the benchmark compare GitHub actions workflow, allowing
|
||||
organization members to initiate a benchmark comparison via a GitHub comment in a PR.
|
||||
|
||||
### Docs
|
||||
|
||||
See .
|
||||
Loading…
Reference in a new issue