Lines Matching refs:io_test
57 print_perftest(struct nvme_io_test *io_test, bool perthread) in print_perftest() argument
62 for (i = 0; i < io_test->num_threads; i++) in print_perftest()
63 io_completed += io_test->io_completed[i]; in print_perftest()
65 iops = io_completed/io_test->time; in print_perftest()
66 mbps = iops * io_test->size / (1024*1024); in print_perftest()
69 io_test->num_threads, io_test->size, in print_perftest()
70 io_test->opc == NVME_OPC_READ ? "READ" : "WRITE", in print_perftest()
71 io_test->time, (uintmax_t)iops, (uintmax_t)mbps); in print_perftest()
74 for (i = 0; i < io_test->num_threads; i++) in print_perftest()
76 (uintmax_t)io_test->io_completed[i]/io_test->time); in print_perftest()
90 struct nvme_io_test io_test; in perftest() local
100 memset(&io_test, 0, sizeof(io_test)); in perftest()
106 io_test.flags |= NVME_TEST_FLAG_REFTHREAD; in perftest()
118 io_test.num_threads = strtoul(optarg, &p, 0); in perftest()
124 } else if (io_test.num_threads == 0 || in perftest()
125 io_test.num_threads > 128) { in perftest()
135 io_test.opc = NVME_OPC_READ; in perftest()
138 io_test.opc = NVME_OPC_WRITE; in perftest()
150 io_test.size = strtoul(optarg, &p, 0); in perftest()
154 io_test.size *= 1024; in perftest()
156 io_test.size *= 1024 * 1024; in perftest()
165 io_test.time = strtoul(optarg, &p, 0); in perftest()
180 if (ioctl(fd, ioctl_cmd, &io_test) < 0) in perftest()
184 print_perftest(&io_test, perthread); in perftest()