[PATCH] Include io depth distribution statistics

Calculate the distribution of io depths for the job run.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/io_u.c b/io_u.c
index 834e5d2..5e53b81 100644
--- a/io_u.c
+++ b/io_u.c
@@ -227,6 +227,31 @@
 	return 1;
 }
 
+static void io_u_mark_depth(struct thread_data *td)
+{
+	int index = 0;
+
+	switch (td->cur_depth) {
+	default:
+		index++;
+	case 32 ... 63:
+		index++;
+	case 16 ... 31:
+		index++;
+	case 8 ... 15:
+		index++;
+	case 4 ... 7:
+		index++;
+	case 2 ... 3:
+		index++;
+	case 1:
+		break;
+	}
+
+	td->io_u_map[index]++;
+	td->total_io_u++;
+}
+
 struct io_u *__get_io_u(struct thread_data *td)
 {
 	struct io_u *io_u = NULL;
@@ -240,6 +265,7 @@
 		list_del(&io_u->list);
 		list_add(&io_u->list, &td->io_u_busylist);
 		td->cur_depth++;
+		io_u_mark_depth(td);
 	}
 
 	return io_u;