Skip to content
Snippets Groups Projects
Commit 3e9e2fd5 authored by Craig Tiller's avatar Craig Tiller Committed by GitHub
Browse files

Merge pull request #10200 from ctiller/bad_tracking

Fix tracking of writes: we dont need TrackCounters for bm_fullstack since the fixture does it
parents d5fa26ee 8c744457
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,6 @@ static void* tag(intptr_t x) { return reinterpret_cast<void*>(x); } ...@@ -63,7 +63,6 @@ static void* tag(intptr_t x) { return reinterpret_cast<void*>(x); }
// the other from server to client): // the other from server to client):
template <class Fixture, class ClientContextMutator, class ServerContextMutator> template <class Fixture, class ClientContextMutator, class ServerContextMutator>
static void BM_StreamingPingPong(benchmark::State& state) { static void BM_StreamingPingPong(benchmark::State& state) {
TrackCounters track_counters;
const int msg_size = state.range(0); const int msg_size = state.range(0);
const int max_ping_pongs = state.range(1); const int max_ping_pongs = state.range(1);
...@@ -152,14 +151,12 @@ static void BM_StreamingPingPong(benchmark::State& state) { ...@@ -152,14 +151,12 @@ static void BM_StreamingPingPong(benchmark::State& state) {
fixture->Finish(state); fixture->Finish(state);
fixture.reset(); fixture.reset();
state.SetBytesProcessed(msg_size * state.iterations() * max_ping_pongs * 2); state.SetBytesProcessed(msg_size * state.iterations() * max_ping_pongs * 2);
track_counters.Finish(state);
} }
// Repeatedly sends ping pong messages in a single streaming Bidi call in a loop // Repeatedly sends ping pong messages in a single streaming Bidi call in a loop
// First parmeter (i.e state.range(0)): Message size (in bytes) to use // First parmeter (i.e state.range(0)): Message size (in bytes) to use
template <class Fixture, class ClientContextMutator, class ServerContextMutator> template <class Fixture, class ClientContextMutator, class ServerContextMutator>
static void BM_StreamingPingPongMsgs(benchmark::State& state) { static void BM_StreamingPingPongMsgs(benchmark::State& state) {
TrackCounters track_counters;
const int msg_size = state.range(0); const int msg_size = state.range(0);
EchoTestService::AsyncService service; EchoTestService::AsyncService service;
...@@ -241,7 +238,6 @@ static void BM_StreamingPingPongMsgs(benchmark::State& state) { ...@@ -241,7 +238,6 @@ static void BM_StreamingPingPongMsgs(benchmark::State& state) {
fixture->Finish(state); fixture->Finish(state);
fixture.reset(); fixture.reset();
state.SetBytesProcessed(msg_size * state.iterations() * 2); state.SetBytesProcessed(msg_size * state.iterations() * 2);
track_counters.Finish(state);
} }
/******************************************************************************* /*******************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment