| 66 | |
| 67 | private: |
| 68 | void CheckThread() { |
| 69 | LOG(INFO) << strings::Substitute( |
| 70 | "Periodic open fd checker starting for path pattern $0" |
| 71 | "(initial: $1 max: $2)", |
| 72 | path_pattern_, initial_fd_count_, max_fd_count_); |
| 73 | do { |
| 74 | int open_fd_count = CountOpenFds(env_, path_pattern_); |
| 75 | KLOG_EVERY_N_SECS(INFO, 1) << strings::Substitute("Open fd count: $0/$1", |
| 76 | open_fd_count, |
| 77 | max_fd_count_); |
| 78 | CHECK_LE(open_fd_count, max_fd_count_); |
| 79 | } while (!running_.WaitFor(MonoDelta::FromMilliseconds(100))); |
| 80 | } |
| 81 | |
| 82 | Env* env_; |
| 83 | const std::string path_pattern_; |
nothing calls this directly
no test coverage detected