Fixup json bandwidth output
authorShaohua Li <ShLi@fusionio.com>
Wed, 3 Apr 2013 06:40:17 +0000 (08:40 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 3 Apr 2013 06:40:17 +0000 (08:40 +0200)
The final version sent in for inclusion had the check mixed
up, so it doesn't output bandwidth unless the calculation
failed.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
stat.c

diff --git a/stat.c b/stat.c
index 59f37184117ba3ac0c225ae6b33ddc3607b83efe..38c5d0238e33ef498c3edfceeca3bfd7740c7a4a 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -775,7 +775,7 @@ static void add_ddir_status_json(struct thread_stat *ts,
        if (ovals)
                free(ovals);
 
-       if (!calc_lat(&ts->bw_stat[ddir], &min, &max, &mean, &dev)) {
+       if (calc_lat(&ts->bw_stat[ddir], &min, &max, &mean, &dev)) {
                if (rs->agg[ddir]) {
                        p_of_agg = mean * 100 / (double) rs->agg[ddir];
                        if (p_of_agg > 100.0)