log: add support for logging max instead of averages
[fio.git] / options.c
index 871552b5b4eefa1f355f03532981e566d3d6d15b..390208729f0db12955cc3a19f72f1d04d9a40b1f 100644 (file)
--- a/options.c
+++ b/options.c
@@ -41,7 +41,7 @@ static int bs_cmp(const void *p1, const void *p2)
        const struct bssplit *bsp1 = p1;
        const struct bssplit *bsp2 = p2;
 
-       return bsp1->perc < bsp2->perc;
+       return (int) bsp1->perc - (int) bsp2->perc;
 }
 
 static int bssplit_ddir(struct thread_options *o, int ddir, char *str)
@@ -3073,6 +3073,16 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .category = FIO_OPT_C_LOG,
                .group  = FIO_OPT_G_INVALID,
        },
+       {
+               .name   = "log_max_value",
+               .lname  = "Log maximum instead of average",
+               .type   = FIO_OPT_BOOL,
+               .off1   = td_var_offset(log_max),
+               .help   = "Log max sample in a window instead of average",
+               .def    = "0",
+               .category = FIO_OPT_C_LOG,
+               .group  = FIO_OPT_G_INVALID,
+       },
        {
                .name   = "log_offset",
                .lname  = "Log offset of IO",