tdfs4ds.serve.process_evolution¶
tdfs4ds.serve.process_evolution
¶
Evolution of one process over its time steps, with a forecast (pure, no I/O).
The input is the frame :func:tdfs4ds.utils.execution_resources.read_execution_resources
returns (one row per execution = one FilterManager segment or one TimeManager
date). A process run over a clock (VALIDTIME_DATE not null) is aggregated BY
TIME STEP: the segments of one step are summed (elapsed, CPU, I/O) or maxed
(spool). A process with no time step (real-time runs) has one point per
execution, at START_DATETIME.
The forecast is deliberately modest: a Theil-Sen line over the step index (robust
to outliers), a band from the residual quantiles 10 / 90 that widens with the
distance, never negative, and none at all under :data:MIN_POINTS steps.
HORIZON_DAYS
module-attribute
¶
METRICS
module-attribute
¶
METRICS = {'elapsed': ('Elapsed time', 'ELAPSED_SEC', 'sum', 'sec'), 'cpu': ('CPU', 'AMP_CPU_SEC', 'sum', 'sec'), 'io': ('I/O', 'TOTAL_IO', 'sum', 'count'), 'spool': ('Peak spool', 'MAX_SPOOL_BYTES', 'max', 'bytes'), 'segments': ('Segments per step', None, 'count', 'count')}
_to_seconds
¶
Epoch seconds (wall clock, zone dropped) of a column of dates, NaN where unreadable.
evolution_series
¶
Points of one process: {points, by_step, metric, has_segments, state}.
A point is {x, t, y, n_segments, n_runs, failed}; y is None when the
metric was not measured for that step. frame must hold one process.
steps_for_horizon
¶
(n_future_steps, gap_days, horizon_days) from the median gap between steps.
forecast_series
¶
{future, summary}: future points {x, t, y, lo, hi} and the summary.
Never fabricates: under :data:MIN_POINTS usable steps summary['enough'] is
False with a reason and future is empty.
render_evolution_svg
¶
render_evolution_svg(points, forecast, metric: str = 'elapsed', width: int = 860, height: int = 280, by_step: bool = True) -> str
One inline SVG (no script, no external request) of the history and the forecast.
analyse
¶
Series + forecast + state for one process frame (what the panel returns).