Expand description
Historical execution duration tracking for ETA estimation.
Responsibilities:
- Record phase durations for completed task executions.
- Provide weighted average calculations for ETA estimation.
- Persist data to
.ralph/cache/execution_history.json.
Not handled here:
- Real-time progress tracking (see
app_execution.rs). - Actual rendering of progress indicators.
Invariants/assumptions:
- Historical data is keyed by (runner, model, phase_count) for accuracy.
- Recent runs are weighted higher (exponential decay).
- Maximum 100 entries per key to prevent unbounded growth.
Structs§
- Execution
Entry - A single execution entry recording phase durations.
- Execution
History - Root execution history data structure.
Functions§
- get_
phase_ averages - Get historical average durations for all phases.
- load_
execution_ history - Load execution history from cache directory.
- record_
execution - Record a completed execution to history.
- save_
execution_ history - Save execution history to cache directory.
- weighted_
average_ duration - Calculate weighted average duration for a specific phase.