Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

An empty implementation of EndpointMetrics that returns zeros for all metrics.

Link copied to clipboard

Endpoint metrics interface

Link copied to clipboard

Tracks BasicEndpointMetrics over time, providing both cumulative and instant (diff since last read) metrics.

Link copied to clipboard
data class TrackedMetrics(val instant: BasicEndpointMetrics, val cumulative: BasicEndpointMetrics)

Represents a pair of instant and cumulative metrics.

Link copied to clipboard
Link copied to clipboard
interface WithMetrics<out T>

Minimal metrics interface

Properties

Link copied to clipboard

The total written bitrate in bits per second (bps).

Functions

Link copied to clipboard
fun WithEndpointMetrics<*>.metricsFlow(interval: Duration = 1000.milliseconds): Flow<TrackedMetrics>

Returns a Flow that emits the BasicEndpointMetrics difference since the last emission. Every collector gets its own isolated EndpointMetricsTracker to prevent state collisions.