mirror of
https://github.com/hinto-janai/gupax.git
synced 2025-01-24 09:45:55 +00:00
num_cpus
-> benri
This commit is contained in:
parent
7d02dfadd0
commit
5eb64a9a3a
4 changed files with 10 additions and 3 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -343,6 +343,12 @@ version = "1.6.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
|
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "benri"
|
||||||
|
version = "0.1.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "dcf749a9459ea5ea4feb27b10368e6e86217274d64bcb8a0409e785c9bdf591d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bit-set"
|
name = "bit-set"
|
||||||
version = "0.5.3"
|
version = "0.5.3"
|
||||||
|
@ -1956,6 +1962,7 @@ dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arti-client",
|
"arti-client",
|
||||||
"arti-hyper",
|
"arti-hyper",
|
||||||
|
"benri",
|
||||||
"bytes",
|
"bytes",
|
||||||
"dirs",
|
"dirs",
|
||||||
"eframe",
|
"eframe",
|
||||||
|
|
|
@ -21,6 +21,7 @@ distro = []
|
||||||
anyhow = "1.0.65"
|
anyhow = "1.0.65"
|
||||||
arti-client = { version = "0.7.0", features = ["static"] }
|
arti-client = { version = "0.7.0", features = ["static"] }
|
||||||
arti-hyper = "0.7.0"
|
arti-hyper = "0.7.0"
|
||||||
|
benri = "0.1.6"
|
||||||
bytes = "1.2.1"
|
bytes = "1.2.1"
|
||||||
dirs = "4.0.0"
|
dirs = "4.0.0"
|
||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
|
@ -47,7 +48,6 @@ hyper = "0.14.20"
|
||||||
hyper-tls = "0.5.0"
|
hyper-tls = "0.5.0"
|
||||||
image = { version = "0.24.4", features = ["png"] }
|
image = { version = "0.24.4", features = ["png"] }
|
||||||
log = "0.4.17"
|
log = "0.4.17"
|
||||||
num_cpus = "1.13.1"
|
|
||||||
num-format = { version = "0.4.3", default-features = false }
|
num-format = { version = "0.4.3", default-features = false }
|
||||||
once_cell = "1.17.1"
|
once_cell = "1.17.1"
|
||||||
portable-pty = "0.7.0"
|
portable-pty = "0.7.0"
|
||||||
|
|
|
@ -220,7 +220,7 @@ impl Default for State {
|
||||||
|
|
||||||
impl State {
|
impl State {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
let max_threads = num_cpus::get();
|
let max_threads = benri::threads!();
|
||||||
let current_threads = if max_threads == 1 { 1 } else { max_threads / 2 };
|
let current_threads = if max_threads == 1 { 1 } else { max_threads / 2 };
|
||||||
Self {
|
Self {
|
||||||
status: Status::default(),
|
status: Status::default(),
|
||||||
|
|
|
@ -248,7 +248,7 @@ impl App {
|
||||||
pub_sys,
|
pub_sys,
|
||||||
benchmarks,
|
benchmarks,
|
||||||
pid,
|
pid,
|
||||||
max_threads: num_cpus::get(),
|
max_threads: benri::threads!(),
|
||||||
now,
|
now,
|
||||||
admin: false,
|
admin: false,
|
||||||
exe: String::new(),
|
exe: String::new(),
|
||||||
|
|
Loading…
Reference in a new issue