Skip to content

Commit

Permalink
perf: Add error message
Browse files Browse the repository at this point in the history
 If "-o" (block size), "-q" (query size), "-t" (time in second),
 "-w" (io pattern) is absent, per doesn't report
 any message.

Signed-off-by: Ivan Betsis <[email protected]>
Signed-off-by: Alla Kiseleva <[email protected]>
  • Loading branch information
Ivan Betsis committed Jan 14, 2020
1 parent d439832 commit a365da0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/nvme/perf/perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,18 +1337,22 @@ parse_args(int argc, char **argv)
}

if (!g_queue_depth) {
fprintf(stderr, "missing -q (queue size) operand\n\n");
usage(argv[0]);
return 1;
}
if (!g_io_size_bytes) {
fprintf(stderr, "missing -o (block size) operand\n\n");
usage(argv[0]);
return 1;
}
if (!workload_type) {
fprintf(stderr, "missing -w (io pattern type) operand\n\n");
usage(argv[0]);
return 1;
}
if (!g_time_in_sec) {
fprintf(stderr, "missing -t (test time in second) operand\n\n");
usage(argv[0]);
return 1;
}
Expand Down

0 comments on commit a365da0

Please sign in to comment.