Table of Contents

Class TimeseriesAggregator

Namespace
FlowOrchestrator.Core.Storage
Assembly
FlowOrchestrator.Core.dll

In-memory bucket aggregator used by SQL store implementations to compute RunTimeseriesBucket series after streaming raw run rows back from the database. Doing percentiles in client code is significantly cheaper than asking SQL Server / PostgreSQL to evaluate PERCENTILE_CONT across a few thousand rows.

public static class TimeseriesAggregator
Inheritance
TimeseriesAggregator
Inherited Members

Methods

Aggregate(IEnumerable<(DateTimeOffset StartedAt, string Status, double? DurationMs)>, RunTimeseriesGranularity, DateTimeOffset, DateTimeOffset)

Aggregates a flat list of (StartedAt, Status, DurationMs) rows into time-bucketed counts and percentiles aligned to the supplied window. Empty buckets are emitted so the caller can render a contiguous timeline.

public static IReadOnlyList<RunTimeseriesBucket> Aggregate(IEnumerable<(DateTimeOffset StartedAt, string Status, double? DurationMs)> rows, RunTimeseriesGranularity granularity, DateTimeOffset since, DateTimeOffset until)

Parameters

rows IEnumerable<(DateTimeOffset StartedAt, string Status, double? DurationMs)>
granularity RunTimeseriesGranularity
since DateTimeOffset
until DateTimeOffset

Returns

IReadOnlyList<RunTimeseriesBucket>