| 151 | } |
| 152 | |
| 153 | void BlockSciDoctor::checkOpenFilesLimit() { |
| 154 | struct rlimit rlim; |
| 155 | getrlimit(RLIMIT_NOFILE, &rlim); |
| 156 | rlim_t openFileLimit = rlim.rlim_cur; |
| 157 | if(openFileLimit < MIN_OPEN_FILES) { |
| 158 | std::stringstream ss; |
| 159 | ss << "Open files limit of " << openFileLimit << " is potentially too low. This could lead to data corruption."; |
| 160 | printWarning(ss.str()); |
| 161 | warnings += 1; |
| 162 | } else { |
| 163 | std::stringstream ss; |
| 164 | ss << "Open files limit of " << openFileLimit << "."; |
| 165 | printOk(ss.str()); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | void BlockSciDoctor::printResults() { |
| 170 | if(warnings + errors > 0) { |
no test coverage detected