11#include < benchmark/benchmark.h>
22#include < fmt/ranges.h>
33
4- #include < random>
5-
6- #include " core/bid_ask.h"
74#include " core/order_book.h"
85#include " spdlog/spdlog.h"
96
10- // / @brief the order book is composed of two asymetrically -sorted collections,
7+ // / @brief the order book is composed of two asymmetrically -sorted collections,
118// / this test is for one of those collections,
129// / (the bid side in this case, because of the additional complexity of a DESC sort)
1310class BookSideFixture : public benchmark ::Fixture {
@@ -21,7 +18,7 @@ class BookSideFixture : public benchmark::Fixture {
2118 }
2219
2320 void TearDown ([[maybe_unused]] const benchmark::State& state) override {
24- spdlog::info (" Levels: [{}]" , bids_);
21+ // spdlog::info("Levels: [{}]", bids_);
2522 }
2623
2724 absl::btree_map<uint64_t , uint64_t , std::greater<>> bids_;
@@ -30,7 +27,7 @@ class BookSideFixture : public benchmark::Fixture {
3027};
3128
3229// / @brief deterministically populate the order book
33- BENCHMARK_DEFINE_F (BookSideFixture, BM_BookUpdate )(benchmark::State& state) {
30+ BENCHMARK_DEFINE_F (BookSideFixture, BENCH_BookUpdate )(benchmark::State& state) {
3431 int i = 0 ;
3532 for (auto _ : state) {
3633 bids_[i] = MID_PRICE - i;
@@ -44,4 +41,4 @@ BENCHMARK_DEFINE_F(BookSideFixture, BM_BookUpdate)(benchmark::State& state) {
4441 benchmark::Counter (state.iterations (), benchmark::Counter::kIsRate );
4542}
4643
47- BENCHMARK_REGISTER_F (BookSideFixture, BM_BookUpdate )->Iterations(500'000 );
44+ BENCHMARK_REGISTER_F (BookSideFixture, BENCH_BookUpdate )->Iterations(500'000 );
0 commit comments