Skip to content

Commit e3fabd6

Browse files
committed
doc: use all cpus
1 parent 980997f commit e3fabd6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/prover/scripts/find_maximal_shapes.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@ fn main() {
6868
);
6969
}
7070

71+
use std::thread::available_parallelism;
7172
// For each program, collect the maximal shapes.
72-
let (tx, rx) = mpsc::sync_channel(10);
73+
let channel_size = available_parallelism().unwrap_or(std::num::NonZeroUsize::new(11).unwrap()).get();
74+
tracing::info!("using channel size: {}", channel_size);
75+
let (tx, rx) = mpsc::sync_channel(channel_size - 1);
7376

7477
if args.reth || args.geth {
7578
let start_block = args.start_block.expect("start block must be provided for reth/geth");
@@ -127,6 +130,7 @@ fn main() {
127130
} else {
128131
let program_list = args.list;
129132
for path in program_list {
133+
tracing::info!("running for program at path: {}", path);
130134
// Read the program and stdin.
131135
let elf = std::fs::read(path.clone() + "/program.bin").expect("failed to read program");
132136
let stdin = std::fs::read(path.clone() + "/stdin.bin").expect("failed to read stdin");

0 commit comments

Comments
 (0)