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

Method dump_and_destroy

src/brpc/span.cpp:911–916  ·  view source on GitHub ↗

The round parameter is required by bvar::Collected interface but unused here. Other implementations (e.g., SampledRequest in rpc_dump.cpp) use it to detect new batches and trigger per-round operations like reloading gflags or switching output files. SpanContainer doesn't need batch-level operations since it writes directly to leveldb without buffering or configuration reloading.

Source from the content-addressed store, hash-verified

909// output files. SpanContainer doesn't need batch-level operations since it writes
910// directly to leveldb without buffering or configuration reloading.
911void SpanContainer::dump_and_destroy(size_t round) {
912 if (_span) {
913 _span->dump_to_db();
914 }
915 destroy();
916}
917
918void SpanContainer::submit(int64_t cpuwide_us) {
919 bvar::Collected::submit(cpuwide_us);

Callers 1

dump_threadMethod · 0.45

Calls 1

dump_to_dbMethod · 0.80

Tested by

no test coverage detected