aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-01 15:00:41 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-11-01 15:00:41 -0700
commit63ec293d73f7701bca5ecbad82acfa21e1d53d73 (patch)
tree0eda267ebb59833cbe2dec900ce20c2a34026f54 /test/cpp/microbenchmarks
parent7213aa78da9967bb18d485ee7a21c0187de34c7b (diff)
Integrate resource quotas
Diffstat (limited to 'test/cpp/microbenchmarks')
-rw-r--r--test/cpp/microbenchmarks/bm_fullstack.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/test/cpp/microbenchmarks/bm_fullstack.cc b/test/cpp/microbenchmarks/bm_fullstack.cc
index 11025caa44..5795c7f4f4 100644
--- a/test/cpp/microbenchmarks/bm_fullstack.cc
+++ b/test/cpp/microbenchmarks/bm_fullstack.cc
@@ -66,10 +66,16 @@ namespace testing {
static class InitializeStuff {
public:
- InitializeStuff() { init_lib.init(); }
+ InitializeStuff() {
+ init_lib_.init();
+ rq_ = grpc_resource_quota_create("bm");
+ }
+
+ grpc_resource_quota* rq() { return rq_; }
private:
- internal::GrpcLibrary init_lib;
+ internal::GrpcLibrary init_lib_;
+ grpc_resource_quota* rq_;
} initialize_stuff;
/*******************************************************************************
@@ -175,8 +181,9 @@ class EndpointPairFixture {
class SockPair : public EndpointPairFixture {
public:
SockPair(Service* service)
- : EndpointPairFixture(service,
- grpc_iomgr_create_endpoint_pair("test", 8192)) {}
+ : EndpointPairFixture(service, grpc_iomgr_create_endpoint_pair(
+ "test", initialize_stuff.rq(), 8192)) {
+ }
};
class InProcessCHTTP2 : public EndpointPairFixture {
@@ -187,7 +194,7 @@ class InProcessCHTTP2 : public EndpointPairFixture {
private:
grpc_endpoint_pair MakeEndpoints() {
grpc_endpoint_pair p;
- grpc_passthru_endpoint_create(&p.client, &p.server);
+ grpc_passthru_endpoint_create(&p.client, &p.server, initialize_stuff.rq());
return p;
}
};