Crate bustle

source ·
Expand description

A benchmarking harness for concurrent key-value collections.

Say you have a concurrent collection (like a HashMap) and you want to measure how well it performs across different workloads. Does it collapse when there are many writes? Or when there are many threads? Or if there are concurrent removals? This crate tries to give you answers.

bustle runs a concurrent mix of operations (a “workload”) against your collection, measuring statistics as it goes, and gives you a report at the end about how you did. There are many parameters to tweak, but hopefully the documentation for each element will help you decide. You probably want to measure your collection against many different workloads, rather than just a single one.

To run the benchmark, just implement Collection for your collection (CollectionHandle may end up just being a call to clone), build a Workload, and call Workload::run parameterized by your collection type. You may want to look at the benchmarks for lock-protected collections from the standard library in benches/ for inspiration.

The crate is, at the time of writing, a pretty direct port of the Universal Benchmark from libcuckoo, though that may change over time.

Structs

Information about a measurement.
A workload mix configration.
A benchmark workload builder.

Traits

A collection that can be benchmarked by bustle.
A handle to a key-value collection.