#[non_exhaustive]pub struct Metrics {Show 20 fields
pub timestamp_unix_seconds: f64,
pub role: Role,
pub direction: MetricDirection,
pub stream_count: usize,
pub protocol: TransportProtocol,
pub transferred_bytes: f64,
pub bandwidth_bits_per_second: f64,
pub tcp_retransmits: Option<f64>,
pub tcp_rtt_seconds: Option<f64>,
pub tcp_rttvar_seconds: Option<f64>,
pub tcp_snd_cwnd_bytes: Option<f64>,
pub tcp_snd_wnd_bytes: Option<f64>,
pub tcp_pmtu_bytes: Option<f64>,
pub tcp_reorder_events: Option<f64>,
pub udp_packets: Option<f64>,
pub udp_lost_packets: Option<f64>,
pub udp_jitter_seconds: Option<f64>,
pub udp_out_of_order_packets: Option<f64>,
pub interval_duration_seconds: f64,
pub omitted: bool,
}Expand description
One libiperf interval sample.
Fields are normalized to Prometheus-friendly units where practical.
Protocol-specific fields use Option<f64> so callers can distinguish an
observed zero from a value that libiperf or the operating system did not
report for this interval.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.timestamp_unix_seconds: f64Unix timestamp, in seconds, when Rust received this interval sample.
role: RoleRole of the iperf test that produced this interval.
direction: MetricDirectionSender/receiver direction represented by this aggregate sample.
stream_count: usizeNumber of libiperf streams represented by this aggregate sample.
protocol: TransportProtocolTransport protocol used by this interval.
transferred_bytes: f64Bytes transferred during the interval.
bandwidth_bits_per_second: f64Interval throughput in bits per second.
tcp_retransmits: Option<f64>TCP retransmits reported for the interval.
tcp_rtt_seconds: Option<f64>TCP smoothed RTT in seconds.
tcp_rttvar_seconds: Option<f64>TCP RTT variance in seconds.
tcp_snd_cwnd_bytes: Option<f64>TCP sender congestion window in bytes.
tcp_snd_wnd_bytes: Option<f64>TCP sender window in bytes when available.
tcp_pmtu_bytes: Option<f64>TCP path MTU in bytes when available.
tcp_reorder_events: Option<f64>TCP reordering events when available.
udp_packets: Option<f64>UDP packet count reported for the interval.
udp_lost_packets: Option<f64>UDP packets inferred lost from sequence gaps.
udp_jitter_seconds: Option<f64>UDP receiver jitter in seconds.
udp_out_of_order_packets: Option<f64>UDP out-of-order packets observed in the interval.
interval_duration_seconds: f64Interval duration in seconds.
omitted: boolWhether this sample belongs to an omitted warm-up interval.