Skip to content

Commit

Permalink
Fix parsing number of jobs and threads
Browse files Browse the repository at this point in the history
  • Loading branch information
rustworthy committed Dec 1, 2023
1 parent 28d4d88 commit 721405f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/bin/loadtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ fn main() {
)
.get_matches();

let jobs = *matches
.get_one::<usize>("jobs")
let jobs = matches
.get_one::<String>("jobs")
.unwrap()
.parse::<usize>()
.expect("Number of jobs to run");
let threads = *matches
.get_one::<usize>("threads")
let threads = matches
.get_one::<String>("threads")
.unwrap()
.parse::<usize>()
.expect("Number of consumers/producers to run");

Check warning on line 39 in src/bin/loadtest.rs

View check run for this annotation

Codecov / codecov/patch

src/bin/loadtest.rs#L30-L39

Added lines #L30 - L39 were not covered by tests
println!(
"Running loadtest with {} jobs and {} threads",
Expand Down

0 comments on commit 721405f

Please sign in to comment.