blktrace: add option to scale a trace
[fio.git] / blktrace.h
1 #ifndef FIO_BLKTRACE_H
2 #define FIO_BLKTRACE_H
3
4
5 #ifdef FIO_HAVE_BLKTRACE
6
7 #include "blktrace_api.h"
8
9 struct blktrace_cursor {
10         struct fifo             *fifo;  // fifo queue for reading
11         int                     fd;     // blktrace file
12         struct blk_io_trace     t;      // current io trace
13         int                     swap;   // bitwise reverse required
14         int                     scalar; // scale percentage
15 };
16
17 bool is_blktrace(const char *, int *);
18 bool load_blktrace(struct thread_data *, const char *, int);
19 int merge_blktrace_iologs(struct thread_data *td);
20
21 #else
22
23 static inline bool is_blktrace(const char *fname, int *need_swap)
24 {
25         return false;
26 }
27
28 static inline bool load_blktrace(struct thread_data *td, const char *fname,
29                                  int need_swap)
30 {
31         return false;
32 }
33
34 #endif
35 #endif