pub struct TaskResourceMetrics {
pub task_id: u64,
pub task_name: String,
pub task_type: String,
pub cpu_usage: f64,
pub memory_usage_mb: f64,
pub io_usage_mb: f64,
pub network_usage_mb: f64,
pub gpu_usage: f64,
}Expand description
Task resource metrics for ranking analysis
This structure contains resource usage metrics for a task, used for calculating efficiency scores and generating optimization recommendations.
Fields§
§task_id: u64Unique identifier for the task
task_name: StringHuman-readable task name
task_type: StringTask type categorization
Supported values (matching TaskType enum):
- “CpuIntensive”: CPU-bound tasks (matrix multiplication, data processing)
- “IoIntensive”: I/O-bound tasks (file operations, database queries)
- “NetworkIntensive”: Network-bound tasks (HTTP requests, RPC calls)
- “MemoryIntensive”: Memory-bound tasks (large data structures, caching)
- “GpuCompute”: GPU compute tasks (CUDA, OpenCL operations)
- “Mixed”: Balanced workload across multiple resources
- “Streaming”: Continuous data processing tasks
- “Background”: Maintenance and cleanup tasks
cpu_usage: f64CPU usage percentage (0.0 to 100.0)
memory_usage_mb: f64Memory usage in megabytes
io_usage_mb: f64I/O usage in megabytes
network_usage_mb: f64Network usage in megabytes
gpu_usage: f64GPU usage percentage (0.0 to 100.0)
Trait Implementations§
Source§impl Clone for TaskResourceMetrics
impl Clone for TaskResourceMetrics
Source§fn clone(&self) -> TaskResourceMetrics
fn clone(&self) -> TaskResourceMetrics
Returns a duplicate of the value. Read more
1.0.0 · 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 TaskResourceMetrics
impl Debug for TaskResourceMetrics
Source§impl<'de> Deserialize<'de> for TaskResourceMetrics
impl<'de> Deserialize<'de> for TaskResourceMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TaskResourceMetrics
impl RefUnwindSafe for TaskResourceMetrics
impl Send for TaskResourceMetrics
impl Sync for TaskResourceMetrics
impl Unpin for TaskResourceMetrics
impl UnsafeUnpin for TaskResourceMetrics
impl UnwindSafe for TaskResourceMetrics
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> 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