mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 10:14:09 +02:00
windows stuff
This commit is contained in:
parent
d12b70d11e
commit
0bb314e5d3
14 changed files with 602 additions and 102 deletions
|
|
@ -2,6 +2,7 @@ use crate::data::{GpuMemory, GpuUsage};
|
|||
use nvml_wrapper::enum_wrappers::device::TemperatureSensor;
|
||||
use nvml_wrapper::{Device, Nvml};
|
||||
use once_cell::sync::Lazy;
|
||||
use std::borrow::Cow;
|
||||
|
||||
static NVIDIA: Lazy<Option<Nvml>> = Lazy::new(|| Nvml::init().ok());
|
||||
|
||||
|
|
@ -49,7 +50,7 @@ pub fn utilization() -> impl Iterator<Item = GpuUsage> {
|
|||
};
|
||||
sources.into_iter().flat_map(|(system, usage)| {
|
||||
Some(GpuUsage {
|
||||
system,
|
||||
system: Cow::Borrowed(system),
|
||||
usage: usage?,
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue