6#include <bench/data/block413567.raw.h>
15#include <validation.h>
24 DataStream stream{benchmark::data::block413567};
32 const auto testing_setup{MakeNoLogFileContext<const TestingSetup>(
ChainType::MAIN)};
33 auto& blockman{testing_setup->m_node.chainman->m_blockman};
36 const auto pos{blockman.WriteBlock(block, 413'567)};
43 const auto testing_setup{MakeNoLogFileContext<const TestingSetup>(
ChainType::MAIN)};
44 auto& blockman{testing_setup->m_node.chainman->m_blockman};
48 const auto success{blockman.ReadBlock(block, pos)};
55 const auto testing_setup{MakeNoLogFileContext<const TestingSetup>(
ChainType::MAIN)};
56 auto& blockman{testing_setup->m_node.chainman->m_blockman};
58 std::vector<uint8_t> block_data;
59 blockman.ReadRawBlock(block_data, pos);
61 const auto success{blockman.ReadRawBlock(block_data, pos)};
Double ended buffer combining vector and stream-like interfaces.
Main entry point to nanobench's benchmarking facility.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
static constexpr TransactionSerParams TX_WITH_WITNESS
static CBlock CreateTestBlock()
static void SaveBlockBench(benchmark::Bench &bench)
static void ReadRawBlockBench(benchmark::Bench &bench)
BENCHMARK(SaveBlockBench, benchmark::PriorityLevel::HIGH)
static void ReadBlockBench(benchmark::Bench &bench)