blktrace: add option to scale a trace
[fio.git] / blktrace.h
index 8656a957d27feac47710a40ce2c25298155de6f5..cebd54d6a58969b463f03219d8129d2fc88db6fc 100644 (file)
@@ -1,22 +1,34 @@
 #ifndef FIO_BLKTRACE_H
 #define FIO_BLKTRACE_H
 
+
 #ifdef FIO_HAVE_BLKTRACE
 
-int is_blktrace(const char *, int *);
-int load_blktrace(struct thread_data *, const char *, int);
+#include "blktrace_api.h"
+
+struct blktrace_cursor {
+       struct fifo             *fifo;  // fifo queue for reading
+       int                     fd;     // blktrace file
+       struct blk_io_trace     t;      // current io trace
+       int                     swap;   // bitwise reverse required
+       int                     scalar; // scale percentage
+};
+
+bool is_blktrace(const char *, int *);
+bool load_blktrace(struct thread_data *, const char *, int);
+int merge_blktrace_iologs(struct thread_data *td);
 
 #else
 
-static inline int is_blktrace(const char *fname, int *need_swap)
+static inline bool is_blktrace(const char *fname, int *need_swap)
 {
-       return 0;
+       return false;
 }
 
-static inline int load_blktrace(struct thread_data *td, const char *fname,
-                               int need_swap)
+static inline bool load_blktrace(struct thread_data *td, const char *fname,
+                                int need_swap)
 {
-       return 1;
+       return false;
 }
 
 #endif