pub struct CpuResourceManager { /* private fields */ }Expand description
CPU resource manager for core allocation and NUMA optimization
Implementations§
Source§impl CpuResourceManager
impl CpuResourceManager
Sourcepub fn allocate_cpu(
&mut self,
request: CpuAllocationRequest,
) -> SklResult<CpuAllocation>
pub fn allocate_cpu( &mut self, request: CpuAllocationRequest, ) -> SklResult<CpuAllocation>
Allocate CPU resources
Sourcepub fn release_cpu(&mut self, task_id: &str) -> SklResult<()>
pub fn release_cpu(&mut self, task_id: &str) -> SklResult<()>
Release CPU allocation
Sourcepub fn get_topology(&self) -> &CpuTopology
pub fn get_topology(&self) -> &CpuTopology
Get CPU topology information
Sourcepub fn update_utilization(&mut self) -> SklResult<()>
pub fn update_utilization(&mut self) -> SklResult<()>
Update CPU utilization statistics
Trait Implementations§
Source§impl Debug for CpuResourceManager
impl Debug for CpuResourceManager
Auto Trait Implementations§
impl Freeze for CpuResourceManager
impl RefUnwindSafe for CpuResourceManager
impl Send for CpuResourceManager
impl Sync for CpuResourceManager
impl Unpin for CpuResourceManager
impl UnwindSafe for CpuResourceManager
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
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