From 3714e302c06a907b7af42a478beae3321b07c70a Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 22 Apr 2016 09:50:46 -0700 Subject: Simplify QPS Metrics collection --- test/cpp/interop/stress_test.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'test/cpp/interop/stress_test.cc') diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index 38caf31b76..d9e3fd25c5 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -56,9 +56,6 @@ extern void gpr_default_log(gpr_log_func_args* args); DEFINE_int32(metrics_port, 8081, "The metrics server port."); -DEFINE_int32(metrics_collection_interval_secs, 5, - "How often (in seconds) should metrics be recorded."); - DEFINE_int32(sleep_duration_ms, 0, "The duration (in millisec) between two" " consecutive test calls (per server) issued by the server."); @@ -275,19 +272,19 @@ int main(int argc, char** argv) { stub_idx++) { StressTestInteropClient* client = new StressTestInteropClient( ++thread_idx, *it, channel, test_selector, FLAGS_test_duration_secs, - FLAGS_sleep_duration_ms, FLAGS_metrics_collection_interval_secs); + FLAGS_sleep_duration_ms); - bool is_already_created; - // Gauge name + bool is_already_created = false; + // QpsGauge name std::snprintf(buffer, sizeof(buffer), "/stress_test/server_%d/channel_%d/stub_%d/qps", server_idx, channel_idx, stub_idx); test_threads.emplace_back(grpc::thread( &StressTestInteropClient::MainLoop, client, - metrics_service.CreateGauge(buffer, &is_already_created))); + metrics_service.CreateQpsGauge(buffer, &is_already_created))); - // The Gauge should not have been already created + // The QpsGauge should not have been already created GPR_ASSERT(!is_already_created); } } -- cgit v1.2.3