Lines Matching refs:opt

60 } opt = {  variable
73 #define OPT(l, s, t, opt, addr, desc) { l, s, t, &opt.addr, desc } argument
74 OPT("perthread", 'p', arg_none, opt, perthread,
76 OPT("threads", 'n', arg_uint32, opt, threads,
78 OPT("size", 's', arg_uint32, opt, size,
80 OPT("time", 't', arg_uint32, opt, time,
82 OPT("operation", 'o', arg_string, opt, op,
84 OPT("interrupt", 'i', arg_string, opt, intr,
86 OPT("flags", 'f', arg_string, opt, flags,
93 { arg_string, &opt.dev, "namespace-id" },
101 .ctx_size = sizeof(opt),
144 if (opt.op == NULL) in perftest()
146 if (opt.flags != NULL && strcmp(opt.flags, "refthread") == 0) in perftest()
148 if (opt.intr != NULL) { in perftest()
149 if (strcmp(opt.intr, "bio") == 0 || in perftest()
150 strcmp(opt.intr, "wait") == 0) in perftest()
152 else if (strcmp(opt.intr, "io") == 0 || in perftest()
153 strcmp(opt.intr, "intr") == 0) in perftest()
156 fprintf(stderr, "Unknown interrupt test type %s\n", opt.intr); in perftest()
160 if (opt.threads <= 0 || opt.threads > 128) { in perftest()
161 fprintf(stderr, "Bad number of threads %d\n", opt.threads); in perftest()
164 io_test.num_threads = opt.threads; in perftest()
165 if (strcasecmp(opt.op, "read") == 0) in perftest()
167 else if (strcasecmp(opt.op, "write") == 0) in perftest()
170 fprintf(stderr, "\"%s\" not valid opcode.\n", opt.op); in perftest()
173 if (opt.time == 0) { in perftest()
177 io_test.time = opt.time; in perftest()
178 io_test.size = opt.size; in perftest()
179 open_dev(opt.dev, &fd, 1, 1); in perftest()
184 print_perftest(&io_test, opt.perthread); in perftest()