This repository consists of two components
- a codespeed installation which collects and presents benchmarking results in a web interface, and
- a haphazard Python script for running high-level Bitcoin Core benchmarks which POSTs results to codespeed.
The benchmarks which are monitored are
- Build time (make)
- Unittest duration (make check)
- Functional test framework duration (test/functional/test_runner.py)
- Microbenchmarks (bench-bitcoin)
- IBD up to some height from a local peer
- Reindex up to some height
- Obtain all the dependencies necessary to build Bitcoin Core. Obtain an up-to-date
copy of the chain at some
$datadir
location. - Install the additional requirements through your package manager:
time wget git python3-pip
(must be python3.6). - Then, run
pip3 install -r runner/requirements.txt
.
cd codespeed && pip install --user -r requirements.txt
- Initialize the codespeed DB:
python manage.py migrate
- Create an admin user (for posting results):
python manage.py createsuperuser
- If you want
./bin/run_bench
to work unmodified, use credentialsroot/foobar00
.
- If you want
- Load required initial data:
python manage.py shell < ../bin/initialize_data.py
- In a separate terminal window, start the development server:
python manage.py runserver 8000
- Browse to http://localhost:8000 and ensure codespeed is up.
- [assuming you have obtained a relatively up-to-date chain in
$datadir
] - In a separate terminal window, run
./bin/start_synced $datadir
- Ensure the peer is up by running
/path/to/bitcoin-cli -rpcport=9001 -rpcuser=foo -rpcpassword=bar getblockchaininfo
.
- Run
./bin/run_bench
.
Use the BENCHES_TO_RUN
envvar when invoking runner/run_bench.py
to only
run certain benchmarks.
Use the BITCOIND_STOPATHEIGHT
envvar when invoking runner/run_bench.py
to
control the height to sync to. This will automatically be reflected in the name
of the benchmarks which are generated.