Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics SDK: Filtering metrics attributes #1191

Merged
merged 19 commits into from
Feb 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix bazel benchmark
lalitb committed Feb 4, 2022
commit 49f48e701209e760794606e3655ca1e3944dde5a
1 change: 1 addition & 0 deletions sdk/test/common/BUILD
Original file line number Diff line number Diff line change
@@ -146,6 +146,7 @@ otel_cc_benchmark(
srcs = ["attributemap_hash_benchmark.cc"],
tags = ["test"],
deps = [
"//api",
"//sdk:headers",
],
)
3 changes: 1 addition & 2 deletions sdk/test/metrics/BUILD
Original file line number Diff line number Diff line change
@@ -23,13 +23,12 @@ cc_test(
],
)

cc_test(
otel_cc_benchmark(
name = "attributes_processor_benchmark",
srcs = [
"attributes_processor_benchmark.cc",
],
deps = [
"//sdk/src/metrics",
"@com_google_googletest//:gtest_main",
],
)
3 changes: 0 additions & 3 deletions sdk/test/metrics/attributes_processor_benchmark.cc
Original file line number Diff line number Diff line change
@@ -10,9 +10,6 @@ namespace
{
void BM_AttributseProcessorFilter(benchmark::State &state)
{

std::string keys[] = {"attr1", "attr2", "attr3", "attr4", "attr5", "attr6"};
int values[] = {10, 20, 30, 40, 50, 60};
std::map<std::string, int> attributes = {
{"att1", 10}, {"attr1", 20}, {"attr3", 30}, {"attr4", 40}};
FilteringAttributesProcessor attributes_processor(