" -p <bool> : Polled IO, default %d\n"
" -B <bool> : Fixed buffers, default %d\n"
" -F <bool> : Register files, default %d\n"
- " -n <int> : Number of threads, default %d\n",
+ " -n <int> : Number of threads, default %d\n"
+ " -N <bool> : Perform just no-op requests, default %d\n",
argv, DEPTH, BATCH_SUBMIT, BATCH_COMPLETE, BS, polled,
- fixedbufs, register_files, nthreads);
+ fixedbufs, register_files, nthreads, do_nop);
exit(status);
}
char *fdepths;
void *ret;
- if (!do_nop && argc < 2) {
- printf("%s: filename [options]\n", argv[0]);
- return 1;
- }
+ if (!do_nop && argc < 2)
+ usage(argv[0], 1);
- while ((opt = getopt(argc, argv, "d:s:c:b:p:B:F:n:h?")) != -1) {
+ while ((opt = getopt(argc, argv, "d:s:c:b:p:B:F:n:N:h?")) != -1) {
switch (opt) {
case 'd':
depth = atoi(optarg);
usage(argv[0], 1);
}
break;
+ case 'N':
+ do_nop = !!atoi(optarg);
+ break;
case 'h':
case '?':
default:
j = 0;
i = optind;
nfiles = argc - i;
- if (!nfiles) {
- printf("No files specified\n");
- usage(argv[0], 1);
- }
- threads_per_f = nthreads / nfiles;
- /* make sure each thread gets assigned files */
- if (threads_per_f == 0) {
- threads_per_f = 1;
- } else {
- threads_rem = nthreads - threads_per_f * nfiles;
+ if (!do_nop) {
+ if (!nfiles) {
+ printf("No files specified\n");
+ usage(argv[0], 1);
+ }
+ threads_per_f = nthreads / nfiles;
+ /* make sure each thread gets assigned files */
+ if (threads_per_f == 0) {
+ threads_per_f = 1;
+ } else {
+ threads_rem = nthreads - threads_per_f * nfiles;
+ }
}
while (!do_nop && i < argc) {
int k, limit;