From: Jens Axboe Date: Sun, 4 Jan 2015 17:02:34 +0000 (-0700) Subject: cleanup: add defines for default pareto or zipf values X-Git-Tag: fio-2.2.5~28 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=c95f94046bc8c659b0fab718bd4029fadc87be5a cleanup: add defines for default pareto or zipf values Signed-off-by: Jens Axboe --- diff --git a/fio.h b/fio.h index 5e352c6c..be2f23aa 100644 --- a/fio.h +++ b/fio.h @@ -642,6 +642,9 @@ enum { FIO_RAND_DIST_PARETO, }; +#define FIO_DEF_ZIPF 1.1 +#define FIO_DEF_PARETO 0.2 + enum { FIO_RAND_GEN_TAUSWORTHE = 0, FIO_RAND_GEN_LFSR, diff --git a/options.c b/options.c index 12ff621d..ab6e399d 100644 --- a/options.c +++ b/options.c @@ -715,9 +715,9 @@ static int str_random_distribution_cb(void *data, const char *str) return 0; if (td->o.random_distribution == FIO_RAND_DIST_ZIPF) - val = 1.1; + val = FIO_DEF_ZIPF; else if (td->o.random_distribution == FIO_RAND_DIST_PARETO) - val = 0.2; + val = FIO_DEF_PARETO; else return 0;