projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
fde90aa
)
cleanup: add defines for default pareto or zipf values
author
Jens Axboe
<axboe@fb.com>
Sun, 4 Jan 2015 17:02:34 +0000
(10:02 -0700)
committer
Jens Axboe
<axboe@fb.com>
Sun, 4 Jan 2015 17:02:34 +0000
(10:02 -0700)
Signed-off-by: Jens Axboe <axboe@fb.com>
fio.h
patch
|
blob
|
blame
|
history
options.c
patch
|
blob
|
blame
|
history
diff --git
a/fio.h
b/fio.h
index 5e352c6cf3cd07722210b06acf6a1b71e0e7b702..be2f23aa9f7662f448c9b1f63b6f087333bdb9a2 100644
(file)
--- 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 12ff621d0f1dfb4c7f96fe3bc2e478e2faa8a46d..ab6e399db5208d81689c0ec9752fa0a7e4adeda1 100644
(file)
--- 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;