pub struct TaskProfile {
pub id: TaskId,
pub name: Option<String>,
pub created_at: u64,
pub started_at: Option<u64>,
pub completed_at: Option<u64>,
pub yield_count: u32,
pub steal_count: u32,
pub completed_by: Option<usize>,
}Expand description
Profiling record for a single task.
Fields§
§id: TaskIdTask id.
name: Option<String>Task name (if any).
created_at: u64Tick at creation.
started_at: Option<u64>Tick at start of execution.
completed_at: Option<u64>Tick at completion.
yield_count: u32Number of times the task yielded.
steal_count: u32Number of times the task was stolen.
completed_by: Option<usize>Worker that ultimately completed the task.
Implementations§
Source§impl TaskProfile
impl TaskProfile
Sourcepub fn new(id: TaskId, created_at: u64) -> Self
pub fn new(id: TaskId, created_at: u64) -> Self
Create a new profile at the given creation tick.
Sourcepub fn queue_latency(&self) -> Option<u64>
pub fn queue_latency(&self) -> Option<u64>
Queuing latency (time from creation to start).
Sourcepub fn execution_time(&self) -> Option<u64>
pub fn execution_time(&self) -> Option<u64>
Execution time (time from start to completion).
Sourcepub fn total_latency(&self) -> Option<u64>
pub fn total_latency(&self) -> Option<u64>
Total latency (creation to completion).
Trait Implementations§
Source§impl Clone for TaskProfile
impl Clone for TaskProfile
Source§fn clone(&self) -> TaskProfile
fn clone(&self) -> TaskProfile
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 moreAuto Trait Implementations§
impl Freeze for TaskProfile
impl RefUnwindSafe for TaskProfile
impl Send for TaskProfile
impl Sync for TaskProfile
impl Unpin for TaskProfile
impl UnsafeUnpin for TaskProfile
impl UnwindSafe for TaskProfile
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