Use r/R/w/W instead of m/M for mixed workloads with 100% reads or writes
authorJens Axboe <jaxboe@fusionio.com>
Thu, 1 Sep 2011 15:58:11 +0000 (09:58 -0600)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 1 Sep 2011 15:58:11 +0000 (09:58 -0600)
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
eta.c

diff --git a/eta.c b/eta.c
index e1cced4..d93bf1a 100644 (file)
--- a/eta.c
+++ b/eta.c
@@ -28,10 +28,21 @@ static void check_str_update(struct thread_data *td)
                break;
        case TD_RUNNING:
                if (td_rw(td)) {
-                       if (td_random(td))
-                               c = 'm';
-                       else
-                               c = 'M';
+                       if (td_random(td)) {
+                               if (td->o.rwmix[DDIR_READ] == 100)
+                                       c = 'r';
+                               else if (td->o.rwmix[DDIR_WRITE] == 100)
+                                       c = 'w';
+                               else
+                                       c = 'm';
+                       } else {
+                               if (td->o.rwmix[DDIR_READ] == 100)
+                                       c = 'R';
+                               else if (td->o.rwmix[DDIR_WRITE] == 100)
+                                       c = 'W';
+                               else
+                                       c = 'M';
+                       }
                } else if (td_read(td)) {
                        if (td_random(td))
                                c = 'r';