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

Function PrintElapse

src/brpc/builtin/rpcz_service.cpp:169–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169static void PrintElapse(std::ostream& os, int64_t cur_time,
170 int64_t* last_time) {
171 const int64_t elp = cur_time - *last_time;
172 *last_time = cur_time;
173 if (elp < 0) {
174 os << std::fixed << std::setw(11) << std::setprecision(6)
175 << elp / 1000000.0;
176 } else {
177 if (elp >= 1000000L) {
178 os << std::setw(4) << elp / 1000000L << '.';
179 } else {
180 os << " .";
181 }
182 os << std::setw(6) << (elp % 1000000L);
183 }
184}
185
186static void PrintAnnotations(
187 std::ostream& os, int64_t cur_time, int64_t* last_time,

Callers 3

PrintAnnotationsFunction · 0.85
default_methodMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected