+static struct fio_option options[] = {
+ {
+ .name = "size",
+ .type = FIO_OPT_STR_VAL,
+ .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 = "threads",
+ .type = FIO_OPT_INT,
+ .roff1 = &nthreads,
+ .help = "Number of Threads",
+ },
+ {
+ .name = NULL,
+ },
+};
+
+/*
+ * Fill our private options into the command line
+ */
+static void tb_prep_cmdline(void)
+{
+
+ /*
+ * tiobench uses size as MB, so multiply up
+ */
+ size *= 1024 * 1024ULL;
+ if (size)
+ sprintf(sz_idx, "size=%llu", size);
+ else
+ strcpy(sz_idx, "size=4*1024*$mb_memory");
+
+ sprintf(bs_idx, "bs=%u", bs);
+ sprintf(loop_idx, "loops=%u", loops);
+
+ if (dir)
+ sprintf(dir_idx, "directory=%s", dir);
+ else
+ sprintf(dir_idx, "directory=./");
+
+ sprintf(t_idx, "numjobs=%u", nthreads);
+}
+