2023-06-19 10:50:29 +00:00
|
|
|
## 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
|
|
|
|
|
|
|
|
|
|
```
|
2025-07-31 15:17:27 +00:00
|
|
|
pnpm benchmarks run
|
2023-06-19 10:50:29 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Running a comparison with local changes
|
|
|
|
|
|
|
|
|
|
```
|
2025-07-31 15:17:27 +00:00
|
|
|
pnpm benchmarks run-compare main
|
|
|
|
|
pnpm benchmarks run-compare <compare-sha> [bazel-target]
|
2023-06-19 10:50:29 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If no benchmark target is specified, a prompt will allow you to select an available benchmark.
|
|
|
|
|
|
|
|
|
|
### Running a comparison in a PR
|
|
|
|
|
|
2025-06-22 17:19:31 +00:00
|
|
|
You can start a comparison by adding a comment as follows to any PR:
|
2023-06-19 10:50:29 +00:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
/benchmark-compare main //modules/benchmarks/src/expanding_rows:perf_chromium
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
/benchmark-compare <other-sha> //modules/benchmarks/src/expanding_rows:perf_chromium
|
|
|
|
|
```
|
|
|
|
|
|
2024-05-28 23:15:16 +00:00
|
|
|
**Note**: An explicit benchmark target must be provided. You can use the prompt
|
2025-07-31 15:17:27 +00:00
|
|
|
of `pnpm benchmarks run` to discover available benchmarks.
|