| 189 | } |
| 190 | |
| 191 | void print_error_codes_file(FILE* f) |
| 192 | { |
| 193 | if (!main_scenario || !main_scenario->stats) { |
| 194 | return; |
| 195 | } |
| 196 | |
| 197 | // Print time and elapsed time to file |
| 198 | struct timeval currentTime, startTime; |
| 199 | GET_TIME(¤tTime); |
| 200 | main_scenario->stats->getStartTime(&startTime); |
| 201 | unsigned long globalElapsedTime = |
| 202 | CStat::computeDiffTimeInMs(¤tTime, &startTime); |
| 203 | fprintf(f, "%s%s", CStat::formatTime(¤tTime, rfc3339), stat_delimiter); |
| 204 | fprintf(f, "%s%s", CStat::msToHHMMSSus(globalElapsedTime), stat_delimiter); |
| 205 | |
| 206 | // Print comma-separated list of all error codes seen since the last time |
| 207 | // this function was called |
| 208 | for (; main_scenario->stats->error_codes.size() != 0;) { |
| 209 | fprintf( |
| 210 | f, "%d,", |
| 211 | main_scenario->stats |
| 212 | ->error_codes[main_scenario->stats->error_codes.size() - 1]); |
| 213 | main_scenario->stats->error_codes.pop_back(); |
| 214 | } |
| 215 | |
| 216 | fprintf(f, "\n"); |
| 217 | fflush(f); |
| 218 | } |
| 219 | |
| 220 | /* Function to dump all available screens in a file */ |
| 221 | void print_screens(void) |
no test coverage detected