diff options
author | Craig Tiller <ctiller@google.com> | 2015-11-20 12:25:54 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-11-20 12:25:54 -0800 |
commit | 0927c70180b3877bae03b3edb849c960f8a4b8a7 (patch) | |
tree | 4f3f2802777c22ab2439d218759aca3bda938410 /test/cpp/interop/stress_interop_client.h | |
parent | b2b4261631fcd6e43344feb7dec45eff5ddbc8a8 (diff) | |
parent | 201d6e13045d96a451ab8cd69395ef1c1ed8adcc (diff) |
Merge github.com:grpc/grpc into no-transport-metadata
Diffstat (limited to 'test/cpp/interop/stress_interop_client.h')
-rw-r--r-- | test/cpp/interop/stress_interop_client.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/cpp/interop/stress_interop_client.h b/test/cpp/interop/stress_interop_client.h index 36261e501f..6fd303d6b7 100644 --- a/test/cpp/interop/stress_interop_client.h +++ b/test/cpp/interop/stress_interop_client.h @@ -41,6 +41,7 @@ #include <grpc++/create_channel.h> #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> 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 function. Use this as the thread entry point. + // qps_gauge is the Gauge to record the requests per second metric + void MainLoop(std::shared_ptr<Gauge> qps_gauge); private: void RunTest(TestCaseType test_case); int test_id_; - std::unique_ptr<InteropClient> interop_client_; const grpc::string& server_address_; + std::shared_ptr<Channel> channel_; + std::unique_ptr<InteropClient> interop_client_; const WeightedRandomTestSelector& test_selector_; long test_duration_secs_; long sleep_duration_ms_; + long metrics_collection_interval_secs_; }; } // namespace testing |