From 57a64324184090fdc9f5052a6a34ab2b42359a22 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 14 Jun 2012 15:11:15 +0200 Subject: [PATCH] Include end-of-run time in the output When results are stored, it's convenient to be able to tell when they were run. Signed-off-by: Jens Axboe --- stat.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/stat.c b/stat.c index 8c846f66..0a047981 100644 --- a/stat.c +++ b/stat.c @@ -523,19 +523,25 @@ void show_thread_status(struct thread_stat *ts, struct group_run_stats *rs) double io_u_dist[FIO_IO_U_MAP_NR]; double io_u_lat_u[FIO_IO_U_LAT_U_NR]; double io_u_lat_m[FIO_IO_U_LAT_M_NR]; + time_t time_p; + char time_buf[64]; if (!(ts->io_bytes[0] + ts->io_bytes[1]) && !(ts->total_io_u[0] + ts->total_io_u[1])) return; + time(&time_p); + ctime_r((const time_t *) &time_p, time_buf); + if (!ts->error) { - log_info("%s: (groupid=%d, jobs=%d): err=%2d: pid=%d\n", + log_info("%s: (groupid=%d, jobs=%d): err=%2d: pid=%d: %s", ts->name, ts->groupid, ts->members, - ts->error, (int) ts->pid); + ts->error, (int) ts->pid, time_buf); } else { - log_info("%s: (groupid=%d, jobs=%d): err=%2d (%s): pid=%d\n", + log_info("%s: (groupid=%d, jobs=%d): err=%2d (%s): pid=%d: %s", ts->name, ts->groupid, ts->members, - ts->error, ts->verror, (int) ts->pid); + ts->error, ts->verror, (int) ts->pid, + time_buf); } if (strlen(ts->description)) -- 2.25.1