summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2010-03-04 12:43:20 +0100
committerJens Axboe <jens.axboe@oracle.com>2010-03-04 12:43:20 +0100
commit79d16311c8d0c7188d73df77838fb1b4b6ff58db (patch)
tree1127c931bac6ece0a99f7c7eaa0e66b2598bc415 /profiles
parent64d9d938dfae4b5dcdc0c6222d2ad11870617426 (diff)
Add support for loadable profiles
Split the only existing profile, tiobench, into this setup. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'profiles')
-rw-r--r--profiles/tiobench.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/profiles/tiobench.c b/profiles/tiobench.c
new file mode 100644
index 0000000..d239468
--- /dev/null
+++ b/profiles/tiobench.c
@@ -0,0 +1,28 @@
+#include "../fio.h"
+#include "../profile.h"
+
+static const char *tb_opts[] = {
+ "buffered=0", "size=4*1024*$mb_memory", "bs=4k", "timeout=600",
+ "numjobs=4", "group_reporting", "thread", "overwrite=1",
+ "filename=.fio.tio.1:.fio.tio.2:.fio.tio.3:.fio.tio.4",
+ "name=seqwrite", "rw=write", "end_fsync=1",
+ "name=randwrite", "stonewall", "rw=randwrite", "end_fsync=1",
+ "name=seqread", "stonewall", "rw=read",
+ "name=randread", "stonewall", "rw=randread", NULL,
+};
+
+static struct profile_ops tiobench_profile = {
+ .name = "tiobench",
+ .version = FIO_PROFILE_VERSION,
+ .def_ops = tb_opts,
+};
+
+static void fio_init tiobench_register(void)
+{
+ register_profile(&tiobench_profile);
+}
+
+static void fio_exit tiobench_unregister(void)
+{
+ unregister_profile(&tiobench_profile);
+}