projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add sample zipf distribution randomizer
[fio.git]
/
fio.h
diff --git
a/fio.h
b/fio.h
index 139b9383f9fbd3ebaf1598b77ecbce244926465a..15ab308488c23b1f6608e1f682d70a4696adc506 100644
(file)
--- a/
fio.h
+++ b/
fio.h
@@
-39,6
+39,7
@@
struct thread_data;
#include "server.h"
#include "stat.h"
#include "flow.h"
#include "server.h"
#include "stat.h"
#include "flow.h"
+#include "lib/zipf.h"
#ifdef FIO_HAVE_GUASI
#include <guasi.h>
#ifdef FIO_HAVE_GUASI
#include <guasi.h>
@@
-177,6
+178,9
@@
struct thread_options {
unsigned int bs_unaligned;
unsigned int fsync_on_close;
unsigned int bs_unaligned;
unsigned int fsync_on_close;
+ unsigned int random_distribution;
+ double zipf_theta;
+
unsigned int hugepage_size;
unsigned int rw_min_bs;
unsigned int thinktime;
unsigned int hugepage_size;
unsigned int rw_min_bs;
unsigned int thinktime;
@@
-452,6
+456,11
@@
struct thread_data {
struct frand_state __random_state;
};
struct frand_state __random_state;
};
+ /*
+ * Used for zipf random distribution
+ */
+ struct zipf_state zipf;
+
struct timeval start; /* start of this loop */
struct timeval epoch; /* time job was started */
struct timeval last_issue;
struct timeval start; /* start of this loop */
struct timeval epoch; /* time job was started */
struct timeval last_issue;
@@
-815,4
+824,9
@@
enum {
FIO_OUTPUT_NORMAL,
};
FIO_OUTPUT_NORMAL,
};
+enum {
+ FIO_RAND_DIST_RANDOM = 0,
+ FIO_RAND_DIST_ZIPF,
+};
+
#endif
#endif