diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2016-04-14 12:59:42 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2016-04-14 13:13:25 -0700 |
commit | 969ffaf5c61aeec0c52a721d64b39528da233fd3 (patch) | |
tree | 43b99c43617edd23c2933a7f755e0b79f7bf00a7 /test/cpp/util | |
parent | f2ba7fe037b4e97d727ba38603364c464144e2e9 (diff) |
Enable JSON reports for qps drivers
Diffstat (limited to 'test/cpp/util')
-rw-r--r-- | test/cpp/util/benchmark_config.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/cpp/util/benchmark_config.cc b/test/cpp/util/benchmark_config.cc index ca4c27ec35..6fc864069e 100644 --- a/test/cpp/util/benchmark_config.cc +++ b/test/cpp/util/benchmark_config.cc @@ -37,6 +37,9 @@ DEFINE_bool(enable_log_reporter, true, "Enable reporting of benchmark results through GprLog"); +DEFINE_string(scenario_result_file, "", + "Write JSON benchmark report to the file specified."); + DEFINE_string(hashed_id, "", "Hash of the user id"); DEFINE_string(test_name, "", "Name of the test being executed"); @@ -68,6 +71,10 @@ static std::shared_ptr<Reporter> InitBenchmarkReporters() { composite_reporter->add( std::unique_ptr<Reporter>(new GprLogReporter("LogReporter"))); } + if (FLAGS_scenario_result_file != "") { + composite_reporter->add(std::unique_ptr<Reporter>( + new JsonReporter("JsonReporter", FLAGS_scenario_result_file))); + } return std::shared_ptr<Reporter>(composite_reporter); } |