diff options
Diffstat (limited to 'test/cpp/microbenchmarks/bm_fullstack.cc')
-rw-r--r-- | test/cpp/microbenchmarks/bm_fullstack.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/cpp/microbenchmarks/bm_fullstack.cc b/test/cpp/microbenchmarks/bm_fullstack.cc index 2b6dd3219c..6cc780d44a 100644 --- a/test/cpp/microbenchmarks/bm_fullstack.cc +++ b/test/cpp/microbenchmarks/bm_fullstack.cc @@ -71,6 +71,8 @@ static class InitializeStuff { rq_ = grpc_resource_quota_create("bm"); } + ~InitializeStuff() { init_lib_.shutdown(); } + grpc_resource_quota* rq() { return rq_; } private: @@ -126,7 +128,16 @@ class TCP : public FullstackFixture { class UDS : public FullstackFixture { public: - UDS(Service* service) : FullstackFixture(service, "unix:bm_fullstack") {} + UDS(Service* service) : FullstackFixture(service, MakeAddress()) {} + + private: + static grpc::string MakeAddress() { + int port = grpc_pick_unused_port_or_die(); // just for a unique id - not a + // real port + std::stringstream addr; + addr << "unix:/tmp/bm_fullstack." << port; + return addr.str(); + } }; class EndpointPairFixture { @@ -221,7 +232,7 @@ class InProcessCHTTP2 : public EndpointPairFixture { * CONTEXT MUTATORS */ -static const int kPregenerateKeyCount = 10000000; +static const int kPregenerateKeyCount = 100000; template <class F> auto MakeVector(size_t length, F f) -> std::vector<decltype(f())> { |