Show how many jobs are in a group
authorJens Axboe <jens.axboe@oracle.com>
Tue, 6 Mar 2007 18:46:09 +0000 (19:46 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 6 Mar 2007 18:46:09 +0000 (19:46 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.h
stat.c

diff --git a/fio.h b/fio.h
index 1b933ca..8d0207a 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -261,6 +261,7 @@ struct thread_stat {
        int groupid;
        pid_t pid;
        char *description;
+       int members;
 
        struct io_log *slat_log;
        struct io_log *clat_log;
diff --git a/stat.c b/stat.c
index 16d2cb2..0b18dd3 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -485,9 +485,9 @@ static void show_thread_status(struct thread_stat *ts,
                return;
 
        if (!ts->error)
-               fprintf(f_out, "%s: (groupid=%d): err=%2d: pid=%d\n", ts->name, ts->groupid, ts->error, ts->pid);
+               fprintf(f_out, "%s: (groupid=%d, jobs=%d): err=%2d: pid=%d\n", ts->name, ts->groupid, ts->members, ts->error, ts->pid);
        else
-               fprintf(f_out, "%s: (groupid=%d): err=%2d (%s): pid=%d\n", ts->name, ts->groupid, ts->error, ts->verror, ts->pid);
+               fprintf(f_out, "%s: (groupid=%d, jobs=%d): err=%2d (%s): pid=%d\n", ts->name, ts->groupid, ts->members, ts->error, ts->verror, ts->pid);
 
        if (ts->io_bytes[DDIR_READ])
                show_ddir_status(rs, ts, DDIR_READ);
@@ -676,6 +676,7 @@ void show_run_stats(void)
                ts = &threadstats[j];
 
                members++;
+               ts->members++;
 
                if (!ts->groupid) {
                        /*