Expand description
Workflow-level cost, token, and duration tracking.
WorkflowTracker aggregates metrics across all shell and agent steps in a
workflow, making it easy to log a single summary at the end with total cost,
token counts, and elapsed time.
§Examples
use ironflow_core::tracker::WorkflowTracker;
let mut tracker = WorkflowTracker::new("deploy-pipeline");
// ... run shell and agent steps, calling
// tracker.record_shell() / tracker.record_agent() after each ...
tracker.summary(); // logs a structured summary via tracing
println!("Total cost: ${:.4}", tracker.total_cost_usd());Structs§
- Workflow
Tracker - Aggregates cost, token, and duration metrics for a named workflow.