2016-05-31 15:18:35 +02:00
|
|
|
Benchmarking
|
|
|
|
============
|
|
|
|
|
2017-12-22 06:09:04 +01:00
|
|
|
Dash Core has an internal benchmarking framework, with benchmarks
|
2019-08-05 13:53:42 +02:00
|
|
|
for cryptographic algorithms (e.g. SHA1, SHA256, SHA512, RIPEMD160, Poly1305, ChaCha20), rolling bloom filter, coins selection,
|
|
|
|
thread queue, wallet balance.
|
2016-05-31 15:18:35 +02:00
|
|
|
|
2018-01-22 14:44:31 +01:00
|
|
|
Running
|
|
|
|
---------------------
|
2019-08-05 13:53:42 +02:00
|
|
|
|
|
|
|
For benchmarks purposes you only need to compile `dash_bench`. Beware of configuring without `--enable-debug` as this would impact
|
|
|
|
benchmarking by unlatching log printers and lock analysis.
|
|
|
|
|
2019-10-09 15:40:39 +02:00
|
|
|
make -C src dash_bench
|
2019-08-05 13:53:42 +02:00
|
|
|
|
2018-01-16 08:29:17 +01:00
|
|
|
After compiling Dash Core, the benchmarks can be run with:
|
2018-01-22 14:44:31 +01:00
|
|
|
|
|
|
|
src/bench/bench_dash
|
2016-05-31 15:18:35 +02:00
|
|
|
|
|
|
|
The output will look similar to:
|
|
|
|
```
|
2021-06-26 12:03:16 +02:00
|
|
|
| ns/byte | byte/s | error % | benchmark
|
|
|
|
|--------------------:|--------------------:|--------:|:----------------------------------------------
|
|
|
|
| 64.13 | 15,592,356.01 | 0.1% | `Base58CheckEncode`
|
|
|
|
| 24.56 | 40,722,672.68 | 0.2% | `Base58Decode`
|
|
|
|
...
|
2016-05-31 15:18:35 +02:00
|
|
|
```
|
|
|
|
|
2018-01-22 14:44:31 +01:00
|
|
|
Help
|
|
|
|
---------------------
|
|
|
|
|
2019-08-05 13:53:42 +02:00
|
|
|
src/bench/bench_dash --help
|
|
|
|
|
|
|
|
To print options like scaling factor or per-benchmark filter.
|
2018-01-22 14:44:31 +01:00
|
|
|
|
|
|
|
Notes
|
|
|
|
---------------------
|
2016-05-31 15:18:35 +02:00
|
|
|
More benchmarks are needed for, in no particular order:
|
|
|
|
- Script Validation
|
|
|
|
- Coins database
|
|
|
|
- Memory pool
|
2019-08-05 13:53:42 +02:00
|
|
|
- Cuckoo Cache
|
|
|
|
- P2P throughput
|
|
|
|
|
|
|
|
Going Further
|
|
|
|
--------------------
|
|
|
|
|
2022-04-19 08:09:42 +02:00
|
|
|
To monitor Dash Core performance more in depth (like reindex or IBD): https://github.com/chaincodelabs/bitcoinperf
|
2019-08-05 13:53:42 +02:00
|
|
|
|
2022-04-19 08:09:42 +02:00
|
|
|
To generate Flame Graphs for Dash Core: https://github.com/eklitzke/bitcoin/blob/flamegraphs/doc/flamegraphs.md
|