First step for group reporting

Put most of the stats into a dedicated structure, so we can
later share such a structure between threads.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index 4596544..e4fec4f 100644
--- a/fio.c
+++ b/fio.c
@@ -597,7 +597,7 @@
 	struct fio_file *f;
 	int i;
 
-	td->stat_io_bytes[0] = td->stat_io_bytes[1] = 0;
+	td->ts.stat_io_bytes[0] = td->ts.stat_io_bytes[1] = 0;
 	td->this_io_bytes[0] = td->this_io_bytes[1] = 0;
 	td->zone_bytes = 0;
 
@@ -686,15 +686,15 @@
 	}
 
 	fio_gettime(&td->epoch, NULL);
-	getrusage(RUSAGE_SELF, &td->ru_start);
+	getrusage(RUSAGE_SELF, &td->ts.ru_start);
 
 	runtime[0] = runtime[1] = 0;
 	while (td->loops--) {
 		fio_gettime(&td->start, NULL);
-		memcpy(&td->stat_sample_time, &td->start, sizeof(td->start));
+		memcpy(&td->ts.stat_sample_time, &td->start, sizeof(td->start));
 
 		if (td->ratemin)
-			memcpy(&td->lastrate, &td->stat_sample_time, sizeof(td->lastrate));
+			memcpy(&td->lastrate, &td->ts.stat_sample_time, sizeof(td->lastrate));
 
 		clear_io_state(td);
 		prune_io_piece_log(td);
@@ -730,12 +730,12 @@
 	td->runtime[0] = runtime[0] / 1000;
 	td->runtime[1] = runtime[1] / 1000;
 
-	if (td->bw_log)
-		finish_log(td, td->bw_log, "bw");
-	if (td->slat_log)
-		finish_log(td, td->slat_log, "slat");
-	if (td->clat_log)
-		finish_log(td, td->clat_log, "clat");
+	if (td->ts.bw_log)
+		finish_log(td, td->ts.bw_log, "bw");
+	if (td->ts.slat_log)
+		finish_log(td, td->ts.slat_log, "slat");
+	if (td->ts.clat_log)
+		finish_log(td, td->ts.clat_log, "clat");
 	if (td->write_iolog_file)
 		write_iolog_close(td);
 	if (td->exec_postrun) {