aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/interop/stress_interop_client.h
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2015-10-27 22:55:26 -0700
committerGravatar Sree Kuchibhotla <sreek@google.com>2015-11-03 14:12:13 -0800
commitb5e98c5c69fe6ce9c069a7192385cd530c35f7a8 (patch)
treea8bcc4e90ac489e47b89eade6cf6b752487ea3a5 /test/cpp/interop/stress_interop_client.h
parent241a5ad3cbb921e99f2ba45789d3acf65a5a845a (diff)
Make number of stubs per channel configurable and expose metrics from
client
Diffstat (limited to 'test/cpp/interop/stress_interop_client.h')
-rw-r--r--test/cpp/interop/stress_interop_client.h13
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..8a769bb02f 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 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<Guage> rps_guage);
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