Bitcoin Core
31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
src
bench
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
>
6
#include <
test/util/setup_common.h
>
7
#include <validation.h>
8
9
#include <memory>
10
11
static
void
CheckBlockIndex
(
benchmark::Bench
&
bench
)
12
{
13
auto
testing_setup{
MakeNoLogFileContext<TestChain100Setup>
()};
14
// Mine some more blocks
15
testing_setup->mineBlocks(1000);
16
bench
.run([&] {
17
testing_setup->m_node.chainman->CheckBlockIndex();
18
});
19
}
20
21
22
BENCHMARK
(
CheckBlockIndex
);
bench.h
BENCHMARK
#define BENCHMARK(n)
Definition
bench.h:68
CheckBlockIndex
static void CheckBlockIndex(benchmark::Bench &bench)
Definition
checkblockindex.cpp:11
ankerl::nanobench::Bench
Main entry point to nanobench's benchmarking facility.
Definition
nanobench.h:627
setup_common.h
Ticks
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition
time.h:73
Generated on Thu Apr 16 2026 09:42:38 for Bitcoin Core by
1.10.0