This should probably be done on an otherwise idle system if you actually want to report the benchmarks.
git clone https://github.com/chaincodelabs/bitcoinperf.git
./bin/install.sh
)../bin/install.sh
.python3 -m pip install --user -e .
bitcoinperf setup
bitcoinperf bench-pr $YOUR_PR_NUM
This repository consists of a few components
It even uses matplotlib to generate graphs that look decent half the time.
The benchmarks which are monitored are
The Python script (bitcoinperf
) may be used as a standalone script
(in conjunction with the Docker configuration) to benchmark and compare
different Bitcoin commits locally - without necessarily writing to a remote
codespeed instance.
You must have Python 3.8 or greater installed.
# Obtain all the dependencies necessary to build Bitcoin Core as well as all
# additional dependencies.
#
# This script is written for Debian-like systems - if you're not on one of
# those, take a look at the script. It should be pretty obvious what you need to
# do.
./bin/install.sh
# If pip warns that the installation path is not in PATH, add it
export PATH=$PATH:~/.local/bin
# Run the guided setup script
bitcoinperf setup
# To run a probably-relevant comparison for a certain pull request, run
bitcoinperf bench-pr $PR_NUM
# To run based upon YAML configuration, use
bitcoinperf run examples/pr_compare.yml
See the examples/ for sample usages.
First, you may have to modify the synced
mountpoint in docker-compose.yml
from /data/bitcoin_bench
to a path on your machine that corresponds to a
Bitcoin datadir which is synced up to your desired stopatheight.
Install docker & docker-compose, then run
#
# Bring up codespeed server and a synced bitcoind instance
$ ./bin/dev up codespeed
# Modify docker-compose.yml to reference a synced datadir on your host machine.
$ sed -ie 's#/data/bitcoin_bench#/path/to/your/datadir#g' docker-compose.dev.yml
$ ./bin/dev runbench bitcoinperf run examples/smoketest.yml
Navigate to http://localhost:8000/ to see results reported to codespeed.
$ ./bin/dev up codespeed
$ ./bin/dev test
Grafana dashboards can be recreated locally by importing the JSON files
stored in grafana_management/backups/
.
When dashboards are edited on the live environment, they should be backed up
using grafana_management/backup_dashboard_json.sh
.
In order for the saved Grafana dashboard configurations to work, you'll need
to make sure you've installed the Postgres views contained in
codespeed/migrations/001-result-views.sql
.