Skip to content

Commit

Permalink
doc: add docs for batch micro benchmarks (#5595)
Browse files Browse the repository at this point in the history
* docs: add docs for batch micro benchmarks

* typo
  • Loading branch information
xxchan authored Sep 27, 2022
1 parent fd25c72 commit c9dc5b9
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/batch/benches/README.md
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

0 comments on commit c9dc5b9

Please sign in to comment.