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

Method RpcDumpContext

src/brpc/rpc_dump.cpp:78–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 static bool Serialize(butil::IOBuf& buf, SampledRequest* sample);
77
78 RpcDumpContext()
79 : _cur_req_count(0)
80 , _cur_fd(-1)
81 , _last_round(0)
82 , _max_requests_in_one_file(0)
83 , _max_files(0)
84 , _sched_write_time(butil::gettimeofday_us() + FLUSH_TIMEOUT)
85 , _last_file_time(0)
86 {
87 _command_name = bvar::read_command_name();
88 SaveFlags();
89 // Clean the directory at fist time.
90 butil::DeleteFile(_dir, true);
91 }
92 ~RpcDumpContext() {
93 if (_cur_fd >= 0) {
94 close(_cur_fd);

Callers

nothing calls this directly

Calls 3

read_command_nameFunction · 0.85
DeleteFileFunction · 0.85
gettimeofday_usFunction · 0.50

Tested by

no test coverage detected