diff options
author | 2016-06-16 17:03:40 -0700 | |
---|---|---|
committer | 2016-06-16 17:03:40 -0700 | |
commit | 909dd6ec8bf41d16073d98b891c8178d5cbd0936 (patch) | |
tree | 63f5ecc7a2cd4876dfdb226b013a2a030a8e0f5e /test/cpp/qps/report.cc | |
parent | 560875239e4ce883b9c02d0bf003ce07d430154b (diff) | |
parent | 2a69beffaae1864bfe22759da742d65c1e044b1f (diff) |
Merge branch 'master' of github.com:grpc/grpc into simplify_compression_interop
Diffstat (limited to 'test/cpp/qps/report.cc')
-rw-r--r-- | test/cpp/qps/report.cc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index 3ae41399cf..2ec7d8676c 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -35,11 +35,9 @@ #include <fstream> -#include <google/protobuf/util/json_util.h> -#include <google/protobuf/util/type_resolver_util.h> - #include <grpc/support/log.h> #include "test/cpp/qps/driver.h" +#include "test/cpp/qps/parse_json.h" #include "test/cpp/qps/stats.h" namespace grpc { @@ -104,18 +102,8 @@ void GprLogReporter::ReportTimes(const ScenarioResult& result) { } void JsonReporter::ReportQPS(const ScenarioResult& result) { - std::unique_ptr<google::protobuf::util::TypeResolver> type_resolver( - google::protobuf::util::NewTypeResolverForDescriptorPool( - "type.googleapis.com", - google::protobuf::DescriptorPool::generated_pool())); - grpc::string binary; - grpc::string json_string; - result.SerializeToString(&binary); - auto status = BinaryToJsonString( - type_resolver.get(), "type.googleapis.com/grpc.testing.ScenarioResult", - binary, &json_string); - GPR_ASSERT(status.ok()); - + grpc::string json_string = + SerializeJson(result, "type.googleapis.com/grpc.testing.ScenarioResult"); std::ofstream output_file(report_file_); output_file << json_string; output_file.close(); |