test(stats): add rolling-window and IPDV property coverage

Add proptest-based generative tests for irtt-stats's stateful rolling
windows and IPDV pairing.

The rolling_count and rolling_time bounds turn out to be two
independent VecDeques (rolling.rs), not a single window bounded by
both, so the main property test proves that independence: it drives a
StatsCollector configured with both bounds simultaneously through
generated operation streams, checking after every operation that each
window matches a from-scratch reference model applying only its own
bound (and that the cumulative snapshot matches a full-history
replay). Since both the production window and the reference replay
the same events through the same deterministic aggregation code, the
comparison is exact equality, not a tolerance.

Also add two smaller property tests for IpdvTracker's bounded FIFO
state and at-most-once adjacent-pair emission under arbitrary
(including non-monotonic and duplicate) sequence streams, complementing
the existing strictly-increasing hand test.

No discrepancies between production and the reference model were
found.
This commit is contained in:
Nils Andreas Svee committed 2026-08-20 10:07:04 +07:00
1 parent a055e80fd3
commit 3e2cf3bad7
4 files changed
+397

No files matched your search

Generated
+1
View File
@@ -778,6 +778,7 @@ name = "irtt-stats"
version = "0.5.0"
dependencies = [
"irtt-client",
"proptest",
]
[[package]]