X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=options.c;h=1857d4115f9a80234ec8aec2bb4a591405448a70;hp=337fecdb54231fca391b837cf363f0552d03d84b;hb=56d9fa4b8d4fa5166e3ec5dcdd37b5789b2cb01d;hpb=16ada7542f32b38c1189390a97b595948079b100 diff --git a/options.c b/options.c index 337fecdb..1857d411 100644 --- a/options.c +++ b/options.c @@ -718,6 +718,8 @@ static int str_random_distribution_cb(void *data, const char *str) val = FIO_DEF_ZIPF; else if (td->o.random_distribution == FIO_RAND_DIST_PARETO) val = FIO_DEF_PARETO; + else if (td->o.random_distribution == FIO_RAND_DIST_GAUSS) + val = 0.0; else return 0; @@ -736,13 +738,14 @@ static int str_random_distribution_cb(void *data, const char *str) return 1; } td->o.zipf_theta.u.f = val; - } else { + } else if (td->o.random_distribution == FIO_RAND_DIST_PARETO) { if (val <= 0.00 || val >= 1.00) { log_err("fio: pareto input out of range (0 < input < 1.0)\n"); return 1; } td->o.pareto_h.u.f = val; - } + } else + td->o.gauss_dev = val; return 0; } @@ -1875,6 +1878,10 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .oval = FIO_RAND_DIST_PARETO, .help = "Pareto distribution", }, + { .ival = "normal", + .oval = FIO_RAND_DIST_GAUSS, + .help = "Normal (gaussian) distribution", + }, }, .category = FIO_OPT_C_IO, .group = FIO_OPT_G_RANDOM,