Skip to content

Commit

Permalink
Fix compilation in the benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
danilak-G committed Apr 4, 2024
1 parent 4e693db commit ab38064
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions snappy_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace {

void FilesAndLevels(::testing::Benchmark* benchmark) {
for (int i = 0; i < ARRAYSIZE(kTestDataFiles); ++i) {
for (int/*level=*/snappy::CompressionOptions::MinCompressionLevel();
for (int level = snappy::CompressionOptions::MinCompressionLevel();
level <= snappy::CompressionOptions::MaxCompressionLevel(); ++level) {
benchmark->ArgPair(i, level);
}
Expand Down Expand Up @@ -163,7 +163,7 @@ BENCHMARK(BM_UValidateMedley);
void BM_UIOVecSource(benchmark::State& state) {
// Pick file to process based on state.range(0).
int file_index = state.range(0);
int/*level=*/state.range(1);
int level = state.range(1);

CHECK_GE(file_index, 0);
CHECK_LT(file_index, ARRAYSIZE(kTestDataFiles));
Expand Down Expand Up @@ -292,7 +292,7 @@ BENCHMARK(BM_UFlatSink)->Apply(FilesAndLevels);
void BM_ZFlat(benchmark::State& state) {
// Pick file to process based on state.range(0).
int file_index = state.range(0);
int/*level=*/state.range(1);
int level = state.range(1);

CHECK_GE(file_index, 0);
CHECK_LT(file_index, ARRAYSIZE(kTestDataFiles));
Expand Down Expand Up @@ -357,7 +357,7 @@ BENCHMARK(BM_ZFlatAll)->DenseRange(1, 2);

void BM_ZFlatIncreasingTableSize(benchmark::State& state) {
CHECK_GT(ARRAYSIZE(kTestDataFiles), 0);
int/*level=*/state.range(0);
int level = state.range(0);
const std::string base_content = ReadTestDataFile(
kTestDataFiles[0].filename, kTestDataFiles[0].size_limit);

Expand Down

0 comments on commit ab38064

Please sign in to comment.