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

Method AnnotateCStr

src/brpc/span.cpp:377–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377void Span::AnnotateCStr(const char* info, size_t length) {
378 const int64_t anno_time = butil::cpuwide_time_us() + _base_real_us;
379 BAIDU_SCOPED_LOCK(_info_spinlock);
380 butil::string_appendf(&_info, BRPC_SPAN_INFO_SEP "%lld ",
381 (long long)anno_time);
382 if (length <= 0) {
383 _info.append(info);
384 } else {
385 _info.append(info, length);
386 }
387}
388
389size_t Span::CountClientSpans() const {
390 size_t n = 1;

Callers 2

SetFailedMethod · 0.80
CloseConnectionMethod · 0.80

Calls 3

cpuwide_time_usFunction · 0.85
string_appendfFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected