docs(irtt-stats): Add documentation comments to public-facing types and fields
Add docstrings to clarify the purpose of statistics collection types and describe the units and behaviors of metric fields.
This commit is contained in:
3 files changed
+114
-3
No files matched your search
@@ -1,15 +1,29 @@
|
||||
use crate::PacketCounts;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
/// Packet loss, duplicate, and late-packet statistics.
|
||||
///
|
||||
/// Percentage fields are percentages from `0.0` to `100.0` in normal cases.
|
||||
/// Directional upstream and downstream loss can be negative when
|
||||
/// server-reported counts exceed local expectations.
|
||||
pub struct LossStats {
|
||||
/// Locally inferred lost packets.
|
||||
pub lost_packets: u64,
|
||||
/// Loss not attributed to a direction.
|
||||
pub unknown_loss_packets: u64,
|
||||
/// Server-assisted upstream loss estimate, when server counts are available.
|
||||
pub upstream_loss_packets: Option<i128>,
|
||||
/// Server-assisted downstream loss estimate, when server counts are available.
|
||||
pub downstream_loss_packets: Option<i128>,
|
||||
/// Total packet loss percentage.
|
||||
pub packet_loss_percent: f64,
|
||||
/// Server-assisted upstream loss percentage.
|
||||
pub upstream_loss_percent: f64,
|
||||
/// Server-assisted downstream loss percentage.
|
||||
pub downstream_loss_percent: f64,
|
||||
/// Duplicate reply percentage.
|
||||
pub duplicate_percent: f64,
|
||||
/// Late reply packet percentage.
|
||||
pub late_packets_percent: f64,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user