Shumai
Shumai is a multi-thread benchmarking framework that produces accurate and reproducible results.
Shumai was developed as part of the Alchemy project to fullfil its academic requirements of accurate and reproducible benchmarking. Shumai put reproducibility as the first priority by automatically collecting the system information, benchmark configurations, and benchmark results. All of this data will be stored together in a json file. The benchmark configurations are also stored in a toml file which should be kept under source control.
Example
# benchmark.toml
[[]]
= "foo"
= [1, 2, 3]
= 1
= [1, 2]
// bench_config.rs
With the above setup, Shumai will write the benchmark results to json files:
Features
-
The
flamegraphfeature generates the flamegraph of the benchmark function (instead of the whole program) with zero config. -
The
pcmfeature collectspcmrelated data, such as l3 cache hit/miss, memory bandwidth (including DRAM and PM), UPI bandwidth etc. It requires a pcm-server running on the target host. -
The
perffeature collects common perf stats, such asCPU_CYCLES,INSTRUCTIONS,BRANCH_MISSESetc.
Note that the above features may be mutually exclusive, i.e. you may enable one feature at a time.
Control benchmark execution
Shumai has two environment variables to control how the benchmark is executed:
SHUMAI_THREAD: only run the benchmark with the specified number of threads, it must be specified in the benchmark config.SHUMAI_FILTER: filters the config, it must be a valid regex string. k