6#include <bench/data/block413567.raw.h>
15#include <validation.h>
32 auto& blockman{testing_setup->m_node.chainman->m_blockman};
35 const auto pos{blockman.WriteBlock(block, 413'567)};
43 auto& blockman{testing_setup->m_node.chainman->m_blockman};
45 const auto& expected_hash{test_block.GetHash()};
46 const auto& pos{blockman.WriteBlock(test_block, 413'567)};
49 const auto success{blockman.ReadBlock(block, pos, expected_hash)};
57 auto& blockman{testing_setup->m_node.chainman->m_blockman};
60 const auto res{blockman.ReadRawBlock(pos)};
Minimal stream for reading from an existing byte array by std::span.
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 ReadRawBlockBench(benchmark::Bench &bench)
static void WriteBlockBench(benchmark::Bench &bench)
static void ReadBlockBench(benchmark::Bench &bench)
std::unique_ptr< T > MakeNoLogFileContext(const ChainType chain_type=ChainType::REGTEST, TestOpts opts={})
Make a test setup that has disk access to the debug.log file disabled.