2023-05-01 17:15:42 +00:00
|
|
|
# Benchmarks
|
|
|
|
|
|
|
|
This directory contains some micro-benchmarks that can help objectively
|
|
|
|
establish the performance implications of a change.
|
|
|
|
|
|
|
|
## Manual usage
|
|
|
|
|
|
|
|
Execute the following command at the top level of the repository:
|
|
|
|
|
|
|
|
```console
|
2023-05-16 22:31:30 +00:00
|
|
|
cargo bench --package surrealdb --no-default-features --features kv-mem,scripting,http
|
|
|
|
```
|
|
|
|
|
|
|
|
## Profiling
|
|
|
|
|
|
|
|
Some of the benchmarks support CPU profiling:
|
|
|
|
|
|
|
|
```console
|
|
|
|
cargo bench --package surrealdb --no-default-features --features kv-mem,scripting,http -- --profile-time=5
|
|
|
|
```
|
|
|
|
|
|
|
|
Once complete, check the `target/criterion/**/profile/flamegraph.svg` files.
|