static void latency_print_single(WTPERF *wtperf, TRACK *total, const char *name) { FILE *fp; u_int i; uint64_t cumops; char path[1024]; testutil_check(__wt_snprintf(path, sizeof(path), "%s/latency.%s", wtperf->monitor_dir, name)); if ((fp = fopen(path, "w")) == NULL) { lprintf(wtperf, errno, 0, "%s", path); return; } fprintf(fp, "#usecs,operations,cumulative-operations,total-operations\n"); cumops = 0; for (i = 0; i < ELEMENTS(total->us); ++i) { if (total->us[i] == 0) continue; cumops += total->us[i]; fprintf(fp, "%u,%" PRIu32 ",%" PRIu64 ",%" PRIu64 "\n", (i + 1), total->us[i], cumops, total->ops); } for (i = 1; i < ELEMENTS(total->ms); ++i) { if (total->ms[i] == 0) continue; cumops += total->ms[i]; fprintf(fp, "%llu,%" PRIu32 ",%" PRIu64 ",%" PRIu64 "\n", ms_to_us(i + 1), total->ms[i], cumops, total->ops); } for (i = 1; i < ELEMENTS(total->sec); ++i) { if (total->sec[i] == 0) continue; cumops += total->sec[i]; fprintf(fp, "%llu,%" PRIu32 ",%" PRIu64 ",%" PRIu64 "\n", sec_to_us(i + 1), total->sec[i], cumops, total->ops); } (void)fclose(fp); }
EXPORT ER dt_gmtime_ms( const SYSTIM* tim_m, struct tm* result ) { return dt_gmtime_us(ms_to_us(tim_m), result); }