MCPcopy Create free account
hub / github.com/SIPp/sipp / print_error_codes_file

Function print_error_codes_file

src/logger.cpp:191–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void 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(&currentTime);
200 main_scenario->stats->getStartTime(&startTime);
201 unsigned long globalElapsedTime =
202 CStat::computeDiffTimeInMs(&currentTime, &startTime);
203 fprintf(f, "%s%s", CStat::formatTime(&currentTime, 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 */
221void print_screens(void)

Callers 1

reportMethod · 0.85

Calls 2

getStartTimeMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected