Skip to content

Commit

Permalink
Use as many threads as logical cores for achieving full utilization (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas committed Jun 27, 2024
1 parent 4df74e8 commit d54c18b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ Throughput: 5,075,400 iterations/sec
"stats" - Prints memory and CPU usage. Has slight impact on throughput.

```sh
cargo run --release --bin metrics --feature=stats
cargo run --release --bin metrics --features=stats
```
2 changes: 1 addition & 1 deletion stress/src/throughput.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ where

handles.push(handle_main_thread);

for thread_index in 0..num_threads - 1 {
for thread_index in 0..num_threads {
let worker_stats_shared = Arc::clone(&worker_stats_shared);
let func_arc_clone = Arc::clone(&func_arc);
let handle = thread::spawn(move || loop {
Expand Down

0 comments on commit d54c18b

Please sign in to comment.