mkdir build
cd build
PKG_CONFIG_PATH=<path to your libbitcoin pkgconfig files> cmake ../
cmake --build .
Stay in the build directory from above
./bm
or ./bm --benchmark-reptitions=N
- The libraries being benchmarked are installed in a directory
pointed to by
PKG_CONFIG_PATH
- Google benchmark is already installed somewhere in the system's pkgconfig path
In directory src/script/
Build target called as bm-script-verify
verify_script_benchmark.cpp
benchmarks the CPU time taken to verify a P2WPKH spending transaction with only one input.
- Have a source of say first N blocks, including all the transactions.
- Skip validation, but instead, call the various
store
API to store the above input data. - Once stored, have another fixed random read queries run for a few seconds.
- The read queries should look for blocks, tx, inputs and outputs.
- Time required to store
- Time required to read various artifacts.
Once benchmark can be used to run the above measurements, the next
goal would be to use perf
to find problem areas to work on.