Files
bitcoin/src/bench/checkblockindex.cpp
MarcoFalke fa51a28a94 scripted-diff: Remove priority_level from BENCHMARK macro
-BEGIN VERIFY SCRIPT-

 sed --in-place --regexp-extended 's/BENCHMARK\(([^,]+), benchmark::PriorityLevel::(HIGH|LOW)\)/BENCHMARK(\1)/g' $( git grep -l PriorityLevel )
 sed --in-place                   's/#define BENCHMARK(n, priority_level)/#define BENCHMARK(n)/g'                ./src/bench/bench.h

-END VERIFY SCRIPT-
2026-01-13 08:33:37 +01:00

23 lines
610 B
C++

// Copyright (c) 2023-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <bench/bench.h>
#include <test/util/setup_common.h>
#include <validation.h>
#include <memory>
static void CheckBlockIndex(benchmark::Bench& bench)
{
auto testing_setup{MakeNoLogFileContext<TestChain100Setup>()};
// Mine some more blocks
testing_setup->mineBlocks(1000);
bench.run([&] {
testing_setup->m_node.chainman->CheckBlockIndex();
});
}
BENCHMARK(CheckBlockIndex);