Bitcoin Core 28.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
checkblockindex.cpp
Go to the documentation of this file.
1// Copyright (c) 2023-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#include <bench/bench.h>
7#include <validation.h>
8
10{
11 auto testing_setup{MakeNoLogFileContext<TestChain100Setup>()};
12 // Mine some more blocks
13 testing_setup->mineBlocks(1000);
14 bench.run([&] {
15 testing_setup->m_node.chainman->CheckBlockIndex();
16 });
17}
18
19
#define BENCHMARK(n, priority_level)
Definition bench.h:79
static void CheckBlockIndex(benchmark::Bench &bench)
Main entry point to nanobench's benchmarking facility.
Definition nanobench.h:627
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
Definition nanobench.h:1234
@ HIGH
Definition bench.h:47
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.