Skip to content

Commit

Permalink
Fixed root cause instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff committed Oct 9, 2023
1 parent d97e164 commit ae1fdad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions sdk/include/opentelemetry/sdk/trace/samplers/parent.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class ParentBasedSampler : public Sampler
nostd::string_view GetDescription() const noexcept override;

private:
const std::shared_ptr<Sampler> delegate_sampler_;
const std::string description_;
std::shared_ptr<Sampler> delegate_sampler_;
std::string description_;
};
} // namespace trace
} // namespace sdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class TraceIdRatioBasedSampler : public Sampler

private:
std::string description_;
const uint64_t threshold_;
uint64_t threshold_;
};
} // namespace trace
} // namespace sdk
Expand Down
6 changes: 0 additions & 6 deletions sdk/test/trace/sampler_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ void BM_AlwaysOnSamplerConstruction(benchmark::State &state)
}
BENCHMARK(BM_AlwaysOnSamplerConstruction);

/*
Fails to build with GCC.
See upstream bug: https://github.com/google/benchmark/issues/1675
*/
#if 0
void BM_ParentBasedSamplerConstruction(benchmark::State &state)
{
while (state.KeepRunning())
Expand All @@ -64,7 +59,6 @@ void BM_TraceIdRatioBasedSamplerConstruction(benchmark::State &state)
}
}
BENCHMARK(BM_TraceIdRatioBasedSamplerConstruction);
#endif

// Sampler Helper Function
void BenchmarkShouldSampler(Sampler &sampler, benchmark::State &state)
Expand Down

0 comments on commit ae1fdad

Please sign in to comment.