aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/util
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/util')
-rw-r--r--test/cpp/util/benchmark_config.cc7
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);
}