| 54 | } |
| 55 | |
| 56 | static void ReadRawBlockBench(benchmark::Bench& bench) |
| 57 | { |
| 58 | const auto testing_setup{MakeNoLogFileContext<const TestingSetup>(ChainType::MAIN)}; |
| 59 | auto& blockman{testing_setup->m_node.chainman->m_blockman}; |
| 60 | const auto pos{WITH_LOCK(::cs_main, return blockman.WriteBlock(CreateTestBlock(), 413'567))}; |
| 61 | bench.run([&] { |
| 62 | const auto res{blockman.ReadRawBlock(pos)}; |
| 63 | assert(res); |
| 64 | }); |
| 65 | } |
| 66 | |
| 67 | BENCHMARK(WriteBlockBench); |
| 68 | BENCHMARK(ReadBlockBench); |
nothing calls this directly
no test coverage detected