Commit | Line | Data |
---|---|---|
79d16311 JA |
1 | #include "../fio.h" |
2 | #include "../profile.h" | |
e2de69da JA |
3 | #include "../parse.h" |
4 | ||
5 | static unsigned long size; | |
6 | static unsigned long loops; | |
7 | static unsigned long bs; | |
8 | static char *dir; | |
79d16311 JA |
9 | |
10 | static const char *tb_opts[] = { | |
11 | "buffered=0", "size=4*1024*$mb_memory", "bs=4k", "timeout=600", | |
12 | "numjobs=4", "group_reporting", "thread", "overwrite=1", | |
13 | "filename=.fio.tio.1:.fio.tio.2:.fio.tio.3:.fio.tio.4", | |
14 | "name=seqwrite", "rw=write", "end_fsync=1", | |
15 | "name=randwrite", "stonewall", "rw=randwrite", "end_fsync=1", | |
16 | "name=seqread", "stonewall", "rw=read", | |
17 | "name=randread", "stonewall", "rw=randread", NULL, | |
18 | }; | |
19 | ||
e2de69da JA |
20 | static struct fio_option options[] = { |
21 | { | |
22 | .name = "size", | |
23 | .type = FIO_OPT_INT, | |
24 | .roff1 = &size, | |
25 | .help = "Size in MB", | |
26 | }, | |
27 | { | |
28 | .name = "block", | |
29 | .type = FIO_OPT_INT, | |
30 | .roff1 = &bs, | |
31 | .help = "Block size in bytes", | |
32 | .def = "4k", | |
33 | }, | |
34 | { | |
35 | .name = "numruns", | |
36 | .type = FIO_OPT_INT, | |
37 | .roff1 = &loops, | |
38 | .help = "Number of runs", | |
39 | }, | |
40 | { | |
41 | .name = "dir", | |
42 | .type = FIO_OPT_STR_STORE, | |
43 | .roff1 = &dir, | |
44 | .help = "Test directory", | |
45 | }, | |
46 | { | |
47 | .name = NULL, | |
48 | }, | |
49 | }; | |
50 | ||
79d16311 JA |
51 | static struct profile_ops tiobench_profile = { |
52 | .name = "tiobench", | |
53 | .version = FIO_PROFILE_VERSION, | |
54 | .def_ops = tb_opts, | |
e2de69da | 55 | .options = options, |
79d16311 JA |
56 | }; |
57 | ||
58 | static void fio_init tiobench_register(void) | |
59 | { | |
60 | register_profile(&tiobench_profile); | |
61 | } | |
62 | ||
63 | static void fio_exit tiobench_unregister(void) | |
64 | { | |
65 | unregister_profile(&tiobench_profile); | |
66 | } |