Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 4345fa6

Browse files
author
Ian Sturdy
authored
Register the gRPC cumulative views in its benchmark. (#73)
1 parent 79c699a commit 4345fa6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

opencensus/plugins/grpc/internal/grpc_plugin_benchmark.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ BENCHMARK(BM_E2eLatencyCensusDisabled);
9595

9696
void BM_E2eLatencyCensusEnabled(benchmark::State& state) {
9797
RegisterOnce();
98+
// This we can safely repeat, and doing so clears accumulated data to avoid
99+
// initialization costs varying between runs.
100+
ExperimentalRegisterGrpcViewsForExport();
98101

99102
EchoServerThread server;
100103
std::unique_ptr<testing::EchoService::Stub> stub =

0 commit comments

Comments
 (0)