From c6c6cc269e49e4baacd7ed496983685f95c02f28 Mon Sep 17 00:00:00 2001 From: Yuxuan Li Date: Thu, 6 Oct 2016 18:28:05 -0700 Subject: [PATCH] change default values flags --- test/cpp/qps/qps_json_driver.cc | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index 9166a4ea12e..e16fb165f01 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -49,13 +49,17 @@ DEFINE_string(scenarios_file, "", DEFINE_string(scenarios_json, "", "JSON string containing an array of Scenario objects"); DEFINE_bool(quit, false, "Quit the workers"); -DEFINE_string( - search_param, "", - "The parameter, whose value is to be searched for to achieve targeted cpu load"); -DEFINE_double(initial_search_value, 1000.0, - "initial parameter value to start the search with (i.e. lower bound)"); -DEFINE_double(targeted_cpu_load, 99.0, "Targeted cpu load (unit: %, range [0,100])"); -DEFINE_double(precision, 500, "Threshold for the search range, below which will end the search."); +DEFINE_string(search_param, "", + "The parameter, whose value is to be searched for to achieve " + "targeted cpu load"); +DEFINE_double( + initial_search_value, 0.0, + "initial parameter value to start the search with (i.e. lower bound)"); +DEFINE_double(targeted_cpu_load, 70.0, + "Targeted cpu load (unit: %, range [0,100])"); +DEFINE_double(precision, 1, + "Threshold for the search range, below which will end the " + "search. Also defines each stride of the search."); namespace grpc { namespace testing { @@ -193,11 +197,10 @@ static bool QpsDriver() { if (FLAGS_search_param == "offered_load") { Scenario* scenario = scenarios.mutable_scenarios(i); double targeted_offered_load = - SearchOfferedLoad(FLAGS_initial_search_value, FLAGS_targeted_cpu_load, - scenario, &success); + SearchOfferedLoad(FLAGS_initial_search_value, + FLAGS_targeted_cpu_load, scenario, &success); gpr_log(GPR_INFO, "targeted_offered_load %f", targeted_offered_load); - } - else { + } else { gpr_log(GPR_ERROR, "Unimplemented search param"); } }