Home | History | Annotate | Download | only in nvmectl

Lines Matching defs:io_test

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