https://github.com/kulpreet/libbitcoin-benchmark
Benchmarking libbitcoin, starting with focus on libbitcoin-database
https://github.com/kulpreet/libbitcoin-benchmark
Last synced: about 1 year ago
JSON representation
Benchmarking libbitcoin, starting with focus on libbitcoin-database
- Host: GitHub
- URL: https://github.com/kulpreet/libbitcoin-benchmark
- Owner: kulpreet
- License: other
- Created: 2019-11-15T11:43:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-17T15:17:11.000Z (over 6 years ago)
- Last Synced: 2025-03-26T14:27:09.164Z (over 1 year ago)
- Language: C++
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
- Authors: AUTHORS
Awesome Lists containing this project
README
# Build
## Build with cmake
`mkdir build`
`cd build`
`PKG_CONFIG_PATH= cmake ../`
`cmake --build .`
## Run
Stay in the build directory from above
`./bm` or `./bm --benchmark-reptitions=N`
## Requirements
1. The libraries being benchmarked are installed in a directory
pointed to by `PKG_CONFIG_PATH`
2. Google benchmark is already installed somewhere in the system's
pkgconfig path
---
## Benchmark script verification
In directory `src/script/`
Build target called as `bm-script-verify`
1. `verify_script_benchmark.cpp` benchmarks the CPU time taken to
verify a P2WPKH spending transaction with only one input.
---
## Benchmark libbitcoin-database
### Inputs
1. Have a source of say first N blocks, including all the transactions.
2. Skip validation, but instead, call the various `store` API to store
the above input data.
3. Once stored, have another fixed random read queries run for a few
seconds.
4. The read queries should look for blocks, tx, inputs and outputs.
### Measure
1. Time required to store
2. Time required to read various artifacts.
### Performance measurements
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.