| 335 | } |
| 336 | |
| 337 | void Span::submit(int64_t cpuwide_us) { |
| 338 | // Note: this method is not called for client-side spans. |
| 339 | EndAsParent(); |
| 340 | SpanContainer* container = new(std::nothrow) SpanContainer(shared_from_this()); |
| 341 | // If memory allocation fails, the server span will not be submitted for persistence. |
| 342 | // The server span will be destroyed later when its shared_ptr refcount drops to zero |
| 343 | // Child spans (held in _client_list) will also be destroyed when |
| 344 | // their refcounts reach zero. |
| 345 | if (container) { |
| 346 | container->submit(cpuwide_us); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | void Span::Annotate(const char* fmt, ...) { |
| 351 | const int64_t anno_time = butil::cpuwide_time_us() + _base_real_us; |
no outgoing calls
no test coverage detected