aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks/fullstack_fixtures.h
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-10-31 11:24:36 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2017-10-31 11:24:36 -0700
commit888691344ea8d42c6ab1f501f7ad71d2e503d844 (patch)
tree8eb630dbcc65cf74550bf61dd0307b0e669c86dc /test/cpp/microbenchmarks/fullstack_fixtures.h
parent77532036b65bc3130c232effb882dc99c302a64a (diff)
parent3e0769957ef310535526647f048e2e003a371a6b (diff)
Merge branch 'master' into testc++ize
Diffstat (limited to 'test/cpp/microbenchmarks/fullstack_fixtures.h')
-rw-r--r--test/cpp/microbenchmarks/fullstack_fixtures.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h
index ba0935719c..71bbb393db 100644
--- a/test/cpp/microbenchmarks/fullstack_fixtures.h
+++ b/test/cpp/microbenchmarks/fullstack_fixtures.h
@@ -25,6 +25,7 @@
#include <grpc++/security/server_credentials.h>
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
+#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
@@ -257,7 +258,8 @@ class InProcessCHTTP2 : public EndpointPairFixture {
void AddToLabel(std::ostream& out, benchmark::State& state) {
EndpointPairFixture::AddToLabel(out, state);
out << " writes/iter:"
- << (double)stats_.num_writes / (double)state.iterations();
+ << static_cast<double>(gpr_atm_no_barrier_load(&stats_.num_writes)) /
+ static_cast<double>(state.iterations());
}
private: