Skip to content

Commit 34f9a01

Browse files
l0rinchodlinator
andcommitted
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 <[email protected]>
1 parent 228aba2 commit 34f9a01

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/bench/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ add_executable(bench_bitcoin
4444
pool.cpp
4545
prevector.cpp
4646
random.cpp
47-
readblock.cpp
47+
readwriteblock.cpp
4848
rollingbloom.cpp
4949
rpc_blockchain.cpp
5050
rpc_mempool.cpp

src/bench/readblock.cpp renamed to src/bench/readwriteblock.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static FlatFilePos WriteBlockToDisk(ChainstateManager& chainman)
2828
return chainman.m_blockman.SaveBlockToDisk(block, 0);
2929
}
3030

31-
static void ReadBlockFromDiskTest(benchmark::Bench& bench)
31+
static void ReadBlockFromDiskBench(benchmark::Bench& bench)
3232
{
3333
const auto testing_setup{MakeNoLogFileContext<const TestingSetup>(ChainType::MAIN)};
3434
ChainstateManager& chainman{*testing_setup->m_node.chainman};
@@ -42,7 +42,7 @@ static void ReadBlockFromDiskTest(benchmark::Bench& bench)
4242
});
4343
}
4444

45-
static void ReadRawBlockFromDiskTest(benchmark::Bench& bench)
45+
static void ReadRawBlockFromDiskBench(benchmark::Bench& bench)
4646
{
4747
const auto testing_setup{MakeNoLogFileContext<const TestingSetup>(ChainType::MAIN)};
4848
ChainstateManager& chainman{*testing_setup->m_node.chainman};
@@ -56,5 +56,5 @@ static void ReadRawBlockFromDiskTest(benchmark::Bench& bench)
5656
});
5757
}
5858

59-
BENCHMARK(ReadBlockFromDiskTest, benchmark::PriorityLevel::HIGH);
60-
BENCHMARK(ReadRawBlockFromDiskTest, benchmark::PriorityLevel::HIGH);
59+
BENCHMARK(ReadBlockFromDiskBench, benchmark::PriorityLevel::HIGH);
60+
BENCHMARK(ReadRawBlockFromDiskBench, benchmark::PriorityLevel::HIGH);

0 commit comments

Comments
 (0)