node-bench is a node-agnostic high-level performance benchmark harness. Right now, it measures Initial Block Download (IBD) throughput, across commits, giving you a longitudinal record of sync performance.
Complementary to microbenchmark tools: those tell you which function regressed and by how much in isolation; node-bench tells you whether it matters at a high level.
| Node | Status |
|---|---|
| kernel-node | primary target |
| btcd | supported |
- Go 1.21+
- Git
- A Bitcoin node repo with a
.node-bench.tomlprofile (or a standalone.tomlfile) - A synced peer on the target network (signet, testnet, mainnet)
go install github.com/pzafonte/node-bench/cmd/node-bench@latestOr build from source:
git clone https://github.com/pzafonte/node-bench
cd node-bench
go build -o node-bench ./cmd/node-benchPlace a .node-bench.toml at the root of the node repo you want to benchmark, or pass a path with --profile.
name = "my-node"
build_cmd = ["cargo", "build", "--release"]
binary_path = "target/release/my-node"
extra_args = ["--nolisten"]
default_peers = ["1.2.3.4:38333"]
[flags]
network_flag = "--signet" # boolean flag — appended as-is
datadir = "--datadir"
connect = "--connect"
[logs]
update_tip = "UpdateTip:" # log line pattern that marks a new blockSee profiles/ for ready-made examples.
node-bench run <repo-path> [flags]| Flag | Default | Description |
|---|---|---|
--profile |
.node-bench.toml in repo |
Path to profile file |
--connect |
profile default_peers |
Peer address(es) to sync from |
--datadir |
temp dir, cleaned after | Data directory for the node |
--network |
signet |
Network to benchmark on |
--duration |
5m |
How long to run the node before stopping |
--trials |
1 |
Number of independent runs |
Result is saved to results/<commit>.json.
node-bench bench <repo-path> <ref-A> <ref-B> [flags]Checks out ref-A, runs run, then checks out ref-B, runs run, and prints a side-by-side comparison. Restores HEAD when done.
node-bench profile <repo-path-or-toml>Prints a human-readable summary of the resolved profile. Useful for debugging before a benchmark run.
node-bench history [results-dir]Prints all saved results sorted by most-recent first. Defaults to ./results.
node-bench compare <result-A.json> <result-B.json>Prints a delta table: absolute and percentage change for header sync, block sync, BPS, and height.
Results are stored as JSON in results/<short-sha>.json:
{
"commit": "9c6fade0",
"branch": "feature/psbtv2-bip375",
"network": "signet",
"blocks_per_sec": 384,
"max_height": 112122
}Commit the results/ directory to build a longitudinal performance record.