MCPcopy Create free account
hub / github.com/apache/brpc / LoadCaseSet

Function LoadCaseSet

example/auto_concurrency_limiter/client.cpp:74–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72bvar::LatencyRecorder g_latency_rec;
73
74void 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
89void HandleEchoResponse(
90 brpc::Controller* cntl,

Callers 3

mainFunction · 0.85
ControlServiceImplMethod · 0.85
NotifyMethod · 0.85

Calls 2

JsonToProtoMessageFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected