From c95f94046bc8c659b0fab718bd4029fadc87be5a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 4 Jan 2015 10:02:34 -0700 Subject: [PATCH] cleanup: add defines for default pareto or zipf values Signed-off-by: Jens Axboe --- fio.h | 3 +++ options.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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; -- 2.25.1