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

Method Echo

example/auto_concurrency_limiter/server.cpp:124–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 }
123
124 virtual void Echo(google::protobuf::RpcController* cntl_base,
125 const test::NotifyRequest* request,
126 test::NotifyResponse* response,
127 google::protobuf::Closure* done) {
128 brpc::ClosureGuard done_guard(done);
129 response->set_message("hello");
130 ::usleep(FLAGS_server_sync_sleep_us);
131 if (FLAGS_use_usleep) {
132 ::usleep(_latency.load(butil::memory_order_relaxed));
133 } else {
134 bthread_usleep(_latency.load(butil::memory_order_relaxed));
135 }
136 }
137
138 void ComputeLatency() {
139 if (_stage_index < _test_case.latency_stage_list_size() &&

Callers 1

RunCaseFunction · 0.45

Calls 2

bthread_usleepFunction · 0.85
loadMethod · 0.45

Tested by

no test coverage detected