mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 10:14:09 +02:00
remove old bench
This commit is contained in:
parent
4e3089ffa5
commit
d519769703
5 changed files with 2 additions and 58 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
|
@ -783,12 +783,6 @@ dependencies = [
|
|||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iai"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71a816c97c42258aa5834d07590b718b4c9a598944cd39a52dc25b351185d678"
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone"
|
||||
version = "0.1.56"
|
||||
|
|
@ -1189,7 +1183,6 @@ dependencies = [
|
|||
"dotenvy",
|
||||
"futures-util",
|
||||
"hostname",
|
||||
"iai",
|
||||
"if-addrs 0.11.0",
|
||||
"libc",
|
||||
"libmdns",
|
||||
|
|
|
|||
|
|
@ -35,12 +35,5 @@ wmi = { version = "0.13.1" }
|
|||
winreg = { version = "0.52.0", features = ["serialization-serde"] }
|
||||
os-thread-local = "0.1.3"
|
||||
|
||||
[dev-dependencies]
|
||||
iai = "0.1.1"
|
||||
|
||||
[[bench]]
|
||||
name = "iai"
|
||||
harness = false
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
use iai::black_box;
|
||||
use palantir::get_metrics;
|
||||
use palantir::sensors::{cpu_time, disk_stats, disk_usage, memory, network_stats, temperatures};
|
||||
use palantir::zfs::pools;
|
||||
|
||||
fn iai_get_metrics() -> String {
|
||||
black_box(get_metrics().unwrap())
|
||||
}
|
||||
|
||||
fn iai_zfs_pool() {
|
||||
black_box(pools().collect::<Vec<_>>());
|
||||
}
|
||||
|
||||
fn iai_temperatures() {
|
||||
black_box(temperatures()).unwrap();
|
||||
}
|
||||
fn iai_network_stats() {
|
||||
black_box(network_stats().unwrap().map(black_box).count());
|
||||
}
|
||||
fn iai_disk_stats() {
|
||||
black_box(disk_stats().unwrap().map(black_box).count());
|
||||
}
|
||||
fn iai_disk_usage() {
|
||||
black_box(disk_usage().unwrap().map(black_box).count());
|
||||
}
|
||||
fn iai_memory() {
|
||||
black_box(memory()).unwrap();
|
||||
}
|
||||
fn iai_cpu_time() {
|
||||
black_box(cpu_time()).unwrap();
|
||||
}
|
||||
|
||||
iai::main!(
|
||||
iai_get_metrics,
|
||||
iai_zfs_pool,
|
||||
iai_temperatures,
|
||||
iai_network_stats,
|
||||
iai_disk_stats,
|
||||
iai_disk_usage,
|
||||
iai_memory,
|
||||
iai_cpu_time
|
||||
);
|
||||
|
|
@ -8,7 +8,7 @@ pub mod data;
|
|||
pub mod docker;
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
mod linux;
|
||||
pub mod linux;
|
||||
#[cfg(target_os = "windows")]
|
||||
pub mod win;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ impl Sensors {
|
|||
disk_stats: Mutex::new(DiskStatSource::new()?),
|
||||
disk_usage: Mutex::new(DiskUsageSource::new()?),
|
||||
cpu_power: Mutex::new(CpuPowerSource::new().unwrap_or_default()),
|
||||
gpu_power: Mutex::new(GpuPowerSource::default()),
|
||||
gpu_power: Mutex::new(GpuPowerSource),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue