Add randtrimwrite data direction
[fio.git] / profile.h
CommitLineData
79d16311
JA
1#ifndef FIO_PROFILE_H
2#define FIO_PROFILE_H
3
4#include "flist.h"
5
7eb36574
JA
6/*
7 * Functions for overriding internal fio io_u functions
8 */
9struct prof_io_ops {
58c55ba0
JA
10 int (*td_init)(struct thread_data *);
11 void (*td_exit)(struct thread_data *);
12
d4afedfd 13 int (*io_u_lat)(struct thread_data *, uint64_t);
7eb36574
JA
14};
15
79d16311
JA
16struct profile_ops {
17 struct flist_head list;
18 char name[32];
e58eb86d 19 char desc[64];
79d16311
JA
20 int flags;
21
2363d8df
JA
22 /*
23 * Profile specific options
24 */
e2de69da 25 struct fio_option *options;
7b504edd 26 void *opt_data;
2363d8df
JA
27
28 /*
29 * Called after parsing options, to prepare 'cmdline'
30 */
d4afedfd 31 int (*prep_cmd)(void);
2363d8df
JA
32
33 /*
34 * The complete command line
35 */
36 const char **cmdline;
15dc1934 37
7eb36574 38 struct prof_io_ops *io_ops;
79d16311
JA
39};
40
07b3232d 41int register_profile(struct profile_ops *);
79d16311
JA
42void unregister_profile(struct profile_ops *);
43int load_profile(const char *);
15dc1934
JA
44struct profile_ops *find_profile(const char *);
45void profile_add_hooks(struct thread_data *);
79d16311 46
58c55ba0
JA
47int profile_td_init(struct thread_data *);
48void profile_td_exit(struct thread_data *);
49
79d16311 50#endif