[PATCH] fio: pretty up thread add by folding ddir and sequential
authorJens Axboe <axboe@suse.de>
Thu, 8 Dec 2005 10:36:22 +0000 (11:36 +0100)
committerJens Axboe <axboe@suse.de>
Thu, 8 Dec 2005 10:36:22 +0000 (11:36 +0100)
fio-ini.c
fio-io.c

index c6ff2003db08fae77c94d991a506be530fce4715..3a668306994bc354be0c2fc66262823e3bfd6d14 100644 (file)
--- a/fio-ini.c
+++ b/fio-ini.c
@@ -160,8 +160,9 @@ static void put_job(struct thread_data *td)
 static int add_job(struct thread_data *td, const char *jobname, int prioclass,
                   int prio)
 {
+       char *ddir_str[] = { "read", "write", "randread", "randwrite" };
        struct stat sb;
-       int numjobs;
+       int numjobs, ddir;
 
 #ifndef FIO_HAVE_LIBAIO
        if (td->io_engine == FIO_LIBAIO) {
@@ -230,7 +231,8 @@ static int add_job(struct thread_data *td, const char *jobname, int prioclass,
        if (write_bw_log)
                setup_log(&td->bw_log);
 
-       printf("Client%d (g=%d): rw=%d, prio=%d/%d, seq=%d, odir=%d, bs=%d-%d, rate=%d, ioengine=%s, iodepth=%d\n", td->thread_number, td->groupid, td->ddir, prioclass, prio, td->sequential, td->odirect, td->min_bs, td->max_bs, td->rate, td->io_engine_name, td->iodepth);
+       ddir = td->ddir + (!td->sequential << 1);
+       printf("Client%d (g=%d): rw=%s, prio=%d/%d, odir=%d, bs=%d-%d, rate=%d, ioengine=%s, iodepth=%d\n", td->thread_number, td->groupid, ddir_str[ddir], prioclass, prio, td->odirect, td->min_bs, td->max_bs, td->rate, td->io_engine_name, td->iodepth);
 
        /*
         * recurse add identical jobs, clear numjobs and stonewall options
index b8b05f059183fdc3aa2bf1b86a9835417ab0b741..3183e8fd56220aa6064c3b41439e3c1abd4adb18 100644 (file)
--- a/fio-io.c
+++ b/fio-io.c
@@ -546,7 +546,6 @@ static int fio_sgio_queue(struct thread_data *td, struct io_u *io_u)
                sd->last_io_u = io_u;
 
        return io_u->error;
-
 }
 
 static struct io_u *fio_sgio_event(struct thread_data *td, int event)