Skip to content

Commit

Permalink
fix bazel finally
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Feb 4, 2022
1 parent 49e6d6a commit 9cb3deb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sdk/test/metrics/attributes_processor_benchmark.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#include <benchmark/benchmark.h>
#ifndef ENABLE_METRICS_PREVIEW
# include <benchmark/benchmark.h>
# include <map>
# include "opentelemetry/sdk/metrics/view/attributes_processor.h"

using namespace opentelemetry::sdk::metrics;
namespace
{
Expand All @@ -15,15 +15,13 @@ void BM_AttributseProcessorFilter(benchmark::State &state)
FilteringAttributesProcessor attributes_processor(
{{"attr2", true}, {"attr4", true}, {"attr6", true}});
opentelemetry::common::KeyValueIterableView<std::map<std::string, int>> iterable(attributes);
auto filtered_attributes = attributes_processor.process(iterable);
while (state.KeepRunning())
{
auto filtered_attributes = attributes_processor.process(iterable);
}
}

BENCHMARK(BM_AttributseProcessorFilter);

} // namespace
BENCHMARK_MAIN();
#endif
BENCHMARK_MAIN();

0 comments on commit 9cb3deb

Please sign in to comment.