update versions of deps; remove num_cpus() dep

This commit is contained in:
milo 2024-02-22 17:56:21 -05:00
parent 75f2eafc4c
commit 096957cce3
5 changed files with 286 additions and 533 deletions

794
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"mino",
"mino-code-gen",

View File

@ -8,9 +8,9 @@ edition = "2021"
mino = { path = "../mino" }
ahash = "0.8"
bumpalo = "3.12"
hashbrown = "0.13"
smallvec = "1.10"
bumpalo = "3.15"
hashbrown = "0.14"
smallvec = "1.13"
tracing = { version = "0.1", default_features = false }
[dev-dependencies]

View File

@ -16,10 +16,9 @@ tracing = { version = "0.1" }
# cli
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"]}
toml = { version = "0.7" }
toml = { version = "0.8" }
serde_json = { version = "1.0" }
clap = { version = "4.0", features = ["derive"] }
clap = { version = "4.5", features = ["derive"] }
anyhow = { version = "1.0" }
ctrlc = { version = "3.2" }
num_cpus = { version = "1.15" }
ctrlc = { version = "3.4" }
chrono = { version = "0.4" }

View File

@ -121,7 +121,14 @@ fn multi(args: MultiRun) -> Result<()> {
let tasks = Arc::new(atomic::AtomicI64::new(tasks));
let exit_early = Arc::new(atomic::AtomicBool::new(false));
let n_jobs = args.jobs.unwrap_or_else(num_cpus::get);
fn default_num_cpus() -> usize {
match std::thread::available_parallelism() {
Ok(n) => n.get(),
Err(_) => 1,
}
}
let n_jobs = args.jobs.unwrap_or_else(default_num_cpus);
let mut jobs = HashMap::with_capacity(n_jobs);
let mut completed = SummaryStats::<usize>::new();