This PR is a brainstorming to gather opinions if there is interest in rewrite the benchmarking framework, to make it more usable and extensible. I currently have a quick hack to test a new API. It shows a few ideas:
Move benchmarking code into tests: the macro
BENCHMARKcreates a boost test with the labelbenchmark, that is disabled by default. To run all benchmarks, execute./test_bitcoin --run_test=@benchmark.Configuration & running of a benchmark is one place:
Benchmark("resize").Iters(1000).Run([] { // code });The configuration can be easily extended with other attributes, e.g. output configuration, automatic runtime configuration, etc.
Please have a look at my change to prevector_tests.cpp which shows a working example.
If there is interest in such a refactoring, I can spend some time on it