Expand description
Metrics collection and performance instrumentation.
Provides counters, gauges, histograms, rolling rates, exponential moving averages, a Prometheus-compatible text exporter, and a performance dashboard that aggregates engine-level statistics into a formatted table.
Structs§
- Aggregate
Stats - Compute summary statistics over a slice of f64 values.
- Category
Report - Detailed per-category memory statistics.
- Engine
Snapshot - A snapshot of engine-level performance data passed to
PerformanceDashboard. - Exponential
Moving Average - Exponential moving average with configurable smoothing factor α.
- Histogram
Buckets - Configurable histogram bucket boundaries with statistical helpers.
- Memory
Tracker - Tracks per-category memory allocations with explicit alloc/free calls.
- Metric
- A single named metric with labels and a current value.
- Metrics
Exporter - Formats a snapshot of metrics as Prometheus text exposition format.
- Metrics
Registry - Thread-safe registry for creating and updating metrics.
- Performance
Dashboard - Aggregates engine performance metrics and renders them as a formatted table with box-drawing characters.
- Rolling
Counter - A counter that tracks events in a fixed time window using a ring buffer.
- Time
Series - A simple fixed-capacity ring buffer of (timestamp_ms, f64) samples.
Enums§
- Metric
Kind - The kind of a metric, determining how its value is interpreted.
- Metric
Value - The actual numeric value stored by a
Metric.