-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: add docs for batch micro benchmarks (#5595)
* docs: add docs for batch micro benchmarks * typo
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Micro Benchmark for Batch Executors | ||
|
||
We use [criterion](https://bheisler.github.io/criterion.rs/book/index.html) micro-benchmarking tool. For more details on how to write and run benchmarks, please refer to its documentation. | ||
|
||
## Run Benchmark | ||
|
||
Run all benchmarks | ||
|
||
```bash | ||
cargo bench -p risingwave_batch | ||
``` | ||
|
||
Run a specific benchmark | ||
|
||
```bash | ||
cargo bench -p risingwave_batch -- <filter> | ||
``` | ||
|
||
where `<filter>` is a regular expression matching the benchmark ID, e.g., | ||
`top_n.rs` uses `BenchmarkId::new("TopNExecutor", params)` , so we can run TopN benchmarks with | ||
|
||
```bash | ||
# All TopN benchmarks | ||
cargo bench -p risingwave_batch -- TopN | ||
# One specific setting of TopN benchmarks | ||
cargo bench -p risingwave_batch -- "TopNExecutor/2048\(single_column: true\)" | ||
``` | ||
|
||
> *Note*: `-p risingwave_batch` can be omitted if you are in the `src/batch` directory. | ||
## Add new Benchmarks | ||
|
||
* Add benchmark target to `src/batch/Cargo.toml` | ||
* Implement benchmarks in `src/batch/benches`, referring to existing ones |