Elapsed Time Metric
Derived timing aggregates for a stage.
The stage's own wall-clock duration lives on StageRecord.realElapsed — this metric only exposes values that are genuinely derived from substages or from the stage's own elapsed:
avgPerFinishedSubstage: mean elapsed time across finished substages. In-progress substages are excluded — including their partial elapsed would skew the average.
maxPerFinishedSubstage: longest finished substage. Useful for spotting outlier items in a dataset iteration.
etc: projected time-to-completion. Prefers the running direct child's own ETC when available (plus projected time for siblings not yet started) — this covers the common "single
iterateDatasetchild" case that the naiverealElapsed / processed × remainingformula can't handle. Falls back to that formula when no child ETC exists.
Constructors
Types
Key holder for ElapsedTimeMetric.
Properties
Mean elapsed time across finished substages (in-progress ones excluded), or null if none.
The key that identifies this metric in a ai.koog.agents.optimization.training.metrics.MetricsMap.
Longest finished substage, useful for spotting outlier items, or null if none.
Retries-aware totals; null when no retries fired below this stage.
Functions
Recompute this metric from the full list of substages records.