X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=profiles%2Ftiobench.c;h=873be994dd8748ef4d8a0a8e5eb863fec717cf6e;hp=d239468f9f3272269089e08590c8ac69d52c4ddc;hb=e2de69dac799a1eecac1b52085f908729591ef5a;hpb=02c6aad501477833c7e017eec0bb14f8e6957b68;ds=sidebyside diff --git a/profiles/tiobench.c b/profiles/tiobench.c index d239468f..873be994 100644 --- a/profiles/tiobench.c +++ b/profiles/tiobench.c @@ -1,5 +1,11 @@ #include "../fio.h" #include "../profile.h" +#include "../parse.h" + +static unsigned long size; +static unsigned long loops; +static unsigned long bs; +static char *dir; static const char *tb_opts[] = { "buffered=0", "size=4*1024*$mb_memory", "bs=4k", "timeout=600", @@ -11,10 +17,42 @@ static const char *tb_opts[] = { "name=randread", "stonewall", "rw=randread", NULL, }; +static struct fio_option options[] = { + { + .name = "size", + .type = FIO_OPT_INT, + .roff1 = &size, + .help = "Size in MB", + }, + { + .name = "block", + .type = FIO_OPT_INT, + .roff1 = &bs, + .help = "Block size in bytes", + .def = "4k", + }, + { + .name = "numruns", + .type = FIO_OPT_INT, + .roff1 = &loops, + .help = "Number of runs", + }, + { + .name = "dir", + .type = FIO_OPT_STR_STORE, + .roff1 = &dir, + .help = "Test directory", + }, + { + .name = NULL, + }, +}; + static struct profile_ops tiobench_profile = { .name = "tiobench", .version = FIO_PROFILE_VERSION, .def_ops = tb_opts, + .options = options, }; static void fio_init tiobench_register(void)