Class MetricsService

Assembly: redb.Tsak.Core.dll

In-memory metrics store with a circular buffer.
Provides collection of process/system metrics and history queries.
Cross-platform: Windows, Linux, macOS.

public class MetricsService

Inheritance

Object→MetricsService

Properties

StoredPointsCount

Number of data points currently stored.

public int StoredPointsCount { get; }

Methods

AddPoint(MetricsPoint)

Add a metrics data point to the circular buffer.

public void AddPoint(MetricsPoint point)

CollectCurrentMetrics()

Collect current process and system metrics.

public MetricsPoint CollectCurrentMetrics()

GetHistory(int)

Get historical metric data for the given time window.

public IReadOnlyList<MetricsPoint> GetHistory(int minutes)

GetLatest()

Get the latest (most recent) metrics point, or null if empty.

public MetricsPoint? GetLatest()

GetSnapshot()

Get a full snapshot: latest point + buffer size.

public (MetricsPoint? Latest, int StoredPoints) GetSnapshot()

Constructors