refactor(client): correct late-reply docs and drop private counter tests

The counter tests instantiated the private TargetCounters and mirrored its
match arms, duplicating outcome-level coverage that already asserts
replies_received and late through ManagedTargetOutcome, and coupling a
private refactor to persistent test churn.

The new counter documentation also defined late replies in timeout-only
terms. A reply that arrives behind an already-received sequence is
classified late by process_echo_reply even when its own probe has not timed
out, so both counters are now described in terms of order and timeout.
This commit is contained in:
Nils Andreas Svee committed 2026-08-15 01:49:25 +07:00
1 parent 5506220f67
commit dd68608d56
3 files changed
+16 -114

No files matched your search

+7 -6
View File
@@ -394,15 +394,16 @@ impl TargetState {
}
}
#[derive(Debug, Default, Eq, PartialEq)]
#[derive(Default)]
struct TargetCounters {
packets_sent: u64,
/// On-time unique echo replies.
/// Unique echo replies that arrived in order and before their probe timed
/// out.
///
/// A late unique reply is counted by `late` and deliberately not here, so
/// `replies_received` stays the count of replies that arrived within their
/// probe timeout. These counters are durable, unlike the lossy managed
/// presentation events.
/// A reply that arrives behind an already-received sequence, or after its
/// own probe timed out, is counted by `late` and deliberately not here.
/// These counters are durable, unlike the lossy managed presentation
/// events.
replies_received: u64,
duplicates: u64,
late: u64,