pub struct ProgressTracker {
pub total_steps: usize,
pub step_durations: Vec<u64>,
}Expand description
Tracks workflow progress and provides status information
Fields§
§total_steps: usizeTotal number of steps in the workflow
step_durations: Vec<u64>Step durations in milliseconds (for estimation)
Implementations§
Source§impl ProgressTracker
impl ProgressTracker
Sourcepub fn record_step_duration(&mut self, duration_ms: u64)
pub fn record_step_duration(&mut self, duration_ms: u64)
Record a step duration
Sourcepub fn calculate_progress(&self, completed_steps: usize) -> u32
pub fn calculate_progress(&self, completed_steps: usize) -> u32
Calculate progress percentage (0-100)
Sourcepub fn estimate_completion_time(
&self,
state: &WorkflowState,
now: DateTime<Utc>,
) -> Option<DateTime<Utc>>
pub fn estimate_completion_time( &self, state: &WorkflowState, now: DateTime<Utc>, ) -> Option<DateTime<Utc>>
Estimate completion time based on step durations
Sourcepub fn generate_status_report(
&self,
state: &WorkflowState,
now: DateTime<Utc>,
) -> StatusReport
pub fn generate_status_report( &self, state: &WorkflowState, now: DateTime<Utc>, ) -> StatusReport
Generate a status report
Sourcepub fn get_average_step_duration(&self) -> Option<u64>
pub fn get_average_step_duration(&self) -> Option<u64>
Get average step duration in milliseconds
Sourcepub fn get_min_step_duration(&self) -> Option<u64>
pub fn get_min_step_duration(&self) -> Option<u64>
Get minimum step duration in milliseconds
Sourcepub fn get_max_step_duration(&self) -> Option<u64>
pub fn get_max_step_duration(&self) -> Option<u64>
Get maximum step duration in milliseconds
Trait Implementations§
Source§impl Clone for ProgressTracker
impl Clone for ProgressTracker
Source§fn clone(&self) -> ProgressTracker
fn clone(&self) -> ProgressTracker
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 ProgressTracker
impl Debug for ProgressTracker
Source§impl<'de> Deserialize<'de> for ProgressTracker
impl<'de> Deserialize<'de> for ProgressTracker
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 ProgressTracker
impl RefUnwindSafe for ProgressTracker
impl Send for ProgressTracker
impl Sync for ProgressTracker
impl Unpin for ProgressTracker
impl UnwindSafe for ProgressTracker
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