btrace2fio: set runtime
authorJens Axboe <axboe@kernel.dk>
Tue, 16 Sep 2014 15:35:55 +0000 (17:35 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Sep 2014 15:35:55 +0000 (17:35 +0200)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/btrace2fio.c

index ef02c692b0c63c924a408c218ce06eb987d41f70..c88c0509faa8b3eb6ee91bff1a0831315f148463 100644 (file)
@@ -532,6 +532,7 @@ static int __output_p_fio(struct btrace_pid *p, unsigned long *ios)
 {
        struct btrace_out *o = &p->o;
        unsigned long total;
+       unsigned long long time;
        float perc;
        int i, j;
 
@@ -585,6 +586,10 @@ static int __output_p_fio(struct btrace_pid *p, unsigned long *ios)
 
        printf("startdelay=%llus\n", o->start_delay / 1000000ULL);
 
+       time = o->last_ttime - o->first_ttime;
+       time = (time + 1000000000ULL - 1) / 1000000000ULL;
+       printf("runtime=%llus\n", time);
+
        printf("bssplit=");
        for (i = 0; i < DDIR_RWDIR_CNT; i++) {