Skip to content

Remove google-benchmark dependency #1148

Description

@678098

There are few issues with libbenchmark:

  • It doesn't support benchmark resource reinitialization between benchmark attempts. In many cases we need to prepare benchmark data before running the benchmark (to measure time precisely for the interesting operation).
  • Extra dependency to install and build (for Sanitizers build).
  • We have to support both benchmark/native versions of the same benchmark code. For this, we have to support conditional macro blocks.

We have 2 components that are enough to make benchmarks without libbenchmark:

  1. bsls::Stopwatch
bsls::Stopwatch stopwatch;
stopwatch.reset();
stopwatch.start();
for (int i = 0; i < k_BENCHMARK_ITERATIONS; ++i) {
    EVENT_TYPE event(&lsa);
    (void)event;
}
stopwatch.stop();
  1. bmqtst::Table: https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqtst/bmqtst_table.h

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions