pub struct SystemProfile {
pub cpu: CpuInfo,
pub memory: MemoryInfo,
pub gpus: Vec<GpuInfo>,
pub npus: Vec<NpuInfo>,
pub network: NetworkInfo,
pub acceleration_mode: AccelerationMode,
pub recommended_workers: usize,
pub system_id: String,
pub detection_source: String,
}Expand description
Complete, platform-agnostic description of the local host.
Fields§
§cpu: CpuInfo§memory: MemoryInfo§gpus: Vec<GpuInfo>§npus: Vec<NpuInfo>§network: NetworkInfo§acceleration_mode: AccelerationModeDerived acceleration mode (best available).
recommended_workers: usizeRecommended worker count for scheduling / pipelines.
system_id: StringPlatform-specific hostname / node identifier.
detection_source: StringBest-effort description of how detection was performed.
Implementations§
Source§impl SystemProfile
impl SystemProfile
Sourcepub fn detect() -> Self
pub fn detect() -> Self
Run full system detection and return the unified profile.
Uses a short-lived cache (30 s) so repeated calls are cheap.
Sourcepub fn detect_fast() -> Self
pub fn detect_fast() -> Self
Fast path: skip slow external commands, use env + sysfs + cached data.
Source§impl SystemProfile
impl SystemProfile
Sourcepub fn to_node_resources(&self) -> NodeResources
pub fn to_node_resources(&self) -> NodeResources
Convenience: build a NodeResources for cluster advertisement.
Trait Implementations§
Source§impl Clone for SystemProfile
impl Clone for SystemProfile
Source§fn clone(&self) -> SystemProfile
fn clone(&self) -> SystemProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemProfile
impl Debug for SystemProfile
Source§impl Default for SystemProfile
impl Default for SystemProfile
Source§fn default() -> SystemProfile
fn default() -> SystemProfile
Returns the “default value” for a type. Read more
Source§impl From<&SystemProfile> for RuntimeProfile
impl From<&SystemProfile> for RuntimeProfile
Source§fn from(sp: &SystemProfile) -> Self
fn from(sp: &SystemProfile) -> Self
Converts to this type from the input type.
Source§impl From<SystemProfile> for RuntimeProfile
impl From<SystemProfile> for RuntimeProfile
Source§fn from(sp: SystemProfile) -> Self
fn from(sp: SystemProfile) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SystemProfile
impl RefUnwindSafe for SystemProfile
impl Send for SystemProfile
impl Sync for SystemProfile
impl Unpin for SystemProfile
impl UnsafeUnpin for SystemProfile
impl UnwindSafe for SystemProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more