From b5e98c5c69fe6ce9c069a7192385cd530c35f7a8 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 27 Oct 2015 22:55:26 -0700 Subject: Make number of stubs per channel configurable and expose metrics from client --- test/cpp/interop/stress_interop_client.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'test/cpp/interop/stress_interop_client.h') diff --git a/test/cpp/interop/stress_interop_client.h b/test/cpp/interop/stress_interop_client.h index 36261e501f..8a769bb02f 100644 --- a/test/cpp/interop/stress_interop_client.h +++ b/test/cpp/interop/stress_interop_client.h @@ -41,6 +41,7 @@ #include #include "test/cpp/interop/interop_client.h" +#include "test/cpp/util/metrics_server.h" namespace grpc { namespace testing { @@ -84,20 +85,26 @@ class WeightedRandomTestSelector { class StressTestInteropClient { public: StressTestInteropClient(int test_id, const grpc::string& server_address, + std::shared_ptr channel, const WeightedRandomTestSelector& test_selector, - long test_duration_secs, long sleep_duration_ms); + long test_duration_secs, long sleep_duration_ms, + long metrics_collection_interval_secs); - void MainLoop(); // The main function. Use this as the thread entry point. + // The main funciton. Use this as the thread entry point. + // rps_guage is the Guage to record the request per second metric + void MainLoop(std::shared_ptr rps_guage); private: void RunTest(TestCaseType test_case); int test_id_; - std::unique_ptr interop_client_; const grpc::string& server_address_; + std::shared_ptr channel_; + std::unique_ptr interop_client_; const WeightedRandomTestSelector& test_selector_; long test_duration_secs_; long sleep_duration_ms_; + long metrics_collection_interval_secs_; }; } // namespace testing -- cgit v1.2.3