cuprate-hinto-janai/benches/criterion/cuprate-database
hinto.janai 8ae208b9f0
Some checks failed
Audit / audit (push) Has been cancelled
Deny / audit (push) Has been cancelled
fix benches
2024-10-22 20:36:14 -04:00
..
benches fix benches 2024-10-22 20:36:14 -04:00
src fix benches 2024-10-22 20:36:14 -04:00
Cargo.toml fix cargo 2024-10-22 17:08:28 -04:00
README.md copy #98 2024-10-21 17:01:11 -04:00

cuprate-database-benchmark

This is a benchmarking suite that allows testing/benchmarking cuprate-database with criterion.

For more information on cargo bench and criterion:

  1. Usage
  2. File Structure

Usage

Ensure the system is as quiet as possible (no background tasks) before starting and during the benchmarks.

To start all benchmarks, run:

cargo bench --package cuprate-database-benchmarks

File Structure

A quick reference of the structure of the folders & files in cuprate-database.

Note that lib.rs/mod.rs files are purely for re-exporting/visibility/lints, and contain no code. Each sub-directory has a corresponding mod.rs.

src/

The top-level src/ files.

The actual cuprate-database-benchmark library crate is just used as a helper for the benchmarks within benches/.

File Purpose
helper.rs Helper functions

benches/

The actual benchmarks.

Each file represents some logical benchmark grouping.

File Purpose
db.rs trait Database{Ro,Rw,Iter} benchmarks
db_multi_thread.rs Same as db.rs but multi-threaded
env.rs trait {Env, EnvInner, TxR{o,w}, Tables[Mut]} benchmarks
env_multi_thread.rs Same as env.rs but multi-threaded
service.rs cuprate_database::service benchmarks
storable.rs trait Storable benchmarks