aboutsummaryrefslogtreecommitdiff
path: root/src/bench/checkblockindex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bench/checkblockindex.cpp')
-rw-r--r--src/bench/checkblockindex.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bench/checkblockindex.cpp b/src/bench/checkblockindex.cpp
new file mode 100644
index 0000000000..e8a848dbd4
--- /dev/null
+++ b/src/bench/checkblockindex.cpp
@@ -0,0 +1,20 @@
+// 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>
+
+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, benchmark::PriorityLevel::HIGH);