| 72 | bvar::LatencyRecorder g_latency_rec; |
| 73 | |
| 74 | void LoadCaseSet(test::TestCaseSet* case_set, const std::string& file_path) { |
| 75 | std::ifstream ifs(file_path.c_str(), std::ios::in); |
| 76 | if (!ifs) { |
| 77 | LOG(FATAL) << "Fail to open case set file: " << file_path; |
| 78 | } |
| 79 | std::string case_set_json((std::istreambuf_iterator<char>(ifs)), |
| 80 | std::istreambuf_iterator<char>()); |
| 81 | std::string err; |
| 82 | if (!json2pb::JsonToProtoMessage(case_set_json, case_set, &err)) { |
| 83 | LOG(FATAL) |
| 84 | << "Fail to trans case_set from json to protobuf message: " |
| 85 | << err; |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | void HandleEchoResponse( |
| 90 | brpc::Controller* cntl, |
no test coverage detected