MetricsTracker

class MetricsTracker(scenario: Scenario, downsample: Boolean) : MetricReporter

Collects and buffers metric values during simulation execution.

The metrics tracker subscribes to all metrics in a scenario and collects their values as the simulation runs. Collected data can be queried after simulation completes.

Parameters

scenario

the Scenario whose metrics are being tracked

downsample

whether to downsample the metrics for performance reasons

Constructors

Link copied to clipboard
constructor(scenario: Scenario, downsample: Boolean)

Properties

Link copied to clipboard

All individual metrics from all metric groups.

Link copied to clipboard

All metric groups grouped by name.

Functions

Link copied to clipboard
fun getMetricDataPoints(currentTime: Instant, metric: Metric): List<MetricValue>

Retrieves all collected data points for a specific metric.

Link copied to clipboard
open override fun report(currentTime: Instant)

Reports metrics at the current simulation time.