Add sample zipf distribution randomizer
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 03e4da1427d251fa5059900cfda102aba411f444..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 "lib/zipf.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 random_distribution;
+       double zipf_theta;
+
        unsigned int hugepage_size;
        unsigned int rw_min_bs;
        unsigned int thinktime;
@@ -198,6 +202,8 @@ struct thread_options {
        enum fio_memtype mem_type;
        unsigned int mem_align;
 
+       unsigned int max_latency;
+
        unsigned int stonewall;
        unsigned int new_group;
        unsigned int numjobs;
@@ -450,6 +456,11 @@ struct thread_data {
                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;
@@ -813,4 +824,9 @@ enum {
        FIO_OUTPUT_NORMAL,
 };
 
+enum {
+       FIO_RAND_DIST_RANDOM    = 0,
+       FIO_RAND_DIST_ZIPF,
+};
+
 #endif