Crates.io | hyper-wrapper |
lib.rs | hyper-wrapper |
version | 0.1.5 |
source | src |
created_at | 2024-11-05 10:37:40.835086 |
updated_at | 2024-11-08 20:35:11.264194 |
description | A JSON configuration wrapper for hyperfine benchmarking tool |
homepage | |
repository | https://github.com/bitcoin-dev-tools/hyper-wrapper |
max_upload_size | |
id | 1436300 |
size | 13,037 |
A Rust-based wrapper for the hyperfine benchmarking tool that allows you to specify benchmark configurations using JSON files.
PATH
cargo install --path .
bench-config.json
):{
"command": "bitcoind -datadir=/mnt/bench/.bitcoin -printtoconsole=0 -dbcache={dbcache} -stopatheight={height}",
"parameter-list": [
{
"name": "height",
"values": "1000,20000,300000"
},
{
"name": "dbcache",
"values": "100,450"
}
],
"prepare": "sync && rm -Rf /mnt/bench/.bitcoin/*",
"conclude": "",
"cleanup": "",
"runs": 1,
"show-output": true,
"export-json": "results.json"
}
hyper-wrapper bench-config.json
The JSON configuration file supports the following options:
Field | Type | Description |
---|---|---|
command |
string | The command to benchmark with parameter placeholders |
parameter-list |
array? | List of parameters and their values for benchmarking |
prepare |
string? | Command to run before each timing run |
conclude |
string? | Command to run after each timing run |
cleanup |
string? | Command to run after all benchmarking runs |
runs |
number? | Number of runs to perform |
show-output |
boolean? | Whether to show command output |
export-json |
string? | Path to export results as JSON |
warmup |
number? | Number of warmup runs |
min-runs |
number? | Minimum number of runs |
max-runs |
number? | Maximum number of runs |
Note: Fields marked with ? are optional.
The parameter-list
array allows you to specify multiple parameters that will be substituted in the command. Each parameter has:
name
: The parameter name (used in the command with {name}
)values
: Comma-separated list of values to testThe wrapper will:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.