| 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); |
nothing calls this directly
no test coverage detected