Skip to main content

Module metrics

Module metrics 

Source
Expand description

Metrics collection from Docker containers.

Defines the MetricsCollector trait with implementations:

§Example

let collector = BollardMetricsCollector::with_config(Arc::new(docker), &config);
let samples = collector.collect().await?;

Structs§

BollardMetricsCollector
A metrics collector that uses a DockerClient (bollard) to fetch container stats.
MetricRingBuffer
MockMetricsCollector
NoopMetricsCollector

Enums§

MetricsError

Traits§

MetricsCollector

Functions§

parse_byte_quantity
parse_percent
Parse a percentage string like “85.42%” into a float.
parse_usage_pair
Parse a usage pair string like “128MiB / 1GiB” into (used, limit) bytes.