mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-03 09:23:01 +01:00
refactor,bench: rename bench/readblock.cpp to bench/readwriteblock.cpp
Done in separate commit to simplify review. Also renames benchmarks, since they're not strictly tests. Co-authored-by: Hodlinator <172445034+hodlinator@users.noreply.github.com>
This commit is contained in:
@@ -44,7 +44,7 @@ add_executable(bench_bitcoin
|
||||
pool.cpp
|
||||
prevector.cpp
|
||||
random.cpp
|
||||
readblock.cpp
|
||||
readwriteblock.cpp
|
||||
rollingbloom.cpp
|
||||
rpc_blockchain.cpp
|
||||
rpc_mempool.cpp
|
||||
|
||||
@@ -28,7 +28,7 @@ static FlatFilePos WriteBlockToDisk(ChainstateManager& chainman)
|
||||
return chainman.m_blockman.SaveBlockToDisk(block, 0);
|
||||
}
|
||||
|
||||
static void ReadBlockFromDiskTest(benchmark::Bench& bench)
|
||||
static void ReadBlockFromDiskBench(benchmark::Bench& bench)
|
||||
{
|
||||
const auto testing_setup{MakeNoLogFileContext<const TestingSetup>(ChainType::MAIN)};
|
||||
ChainstateManager& chainman{*testing_setup->m_node.chainman};
|
||||
@@ -42,7 +42,7 @@ static void ReadBlockFromDiskTest(benchmark::Bench& bench)
|
||||
});
|
||||
}
|
||||
|
||||
static void ReadRawBlockFromDiskTest(benchmark::Bench& bench)
|
||||
static void ReadRawBlockFromDiskBench(benchmark::Bench& bench)
|
||||
{
|
||||
const auto testing_setup{MakeNoLogFileContext<const TestingSetup>(ChainType::MAIN)};
|
||||
ChainstateManager& chainman{*testing_setup->m_node.chainman};
|
||||
@@ -56,5 +56,5 @@ static void ReadRawBlockFromDiskTest(benchmark::Bench& bench)
|
||||
});
|
||||
}
|
||||
|
||||
BENCHMARK(ReadBlockFromDiskTest, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(ReadRawBlockFromDiskTest, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(ReadBlockFromDiskBench, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(ReadRawBlockFromDiskBench, benchmark::PriorityLevel::HIGH);
|
||||
Reference in New Issue
Block a user