chore(antithesis): dogstatsd generation with byte limit#1974
Conversation
Binary Size Analysis (Agent Data Plane)Baseline: dff1654 · Comparison: 9fe3971 · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (5)Experiments configured
Bounds Checks: ✅ Passed (5)
ExplanationA change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression ( |
There was a problem hiding this comment.
Pull request overview
This PR updates the Antithesis DogStatsD harness to generate byte-limited, newline-packed payloads (instead of single lines) and refactors payload sampling to use rand’s slice/array selection APIs with an explicit RNG, adding property tests to lock in the new size/invariant behavior.
Changes:
- Introduce
PAYLOAD_BYTE_LIMIT,Payload,write_line, andwrite_payloadto generate\n-terminated lines packed into datagrams without exceeding a byte limit. - Update the load driver to send payload datagrams and report sent line counts / max packed counts across payloads.
- Add proptest-based invariants (and a regression seed file) for payload/line size and newline-count properties.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| test/antithesis/scenarios/general/src/bin/parallel_driver_send_dogstatsd.rs | Switch scenario to use driver::sample() after driver API refactor. |
| test/antithesis/scenarios/differential/src/bin/parallel_driver_send_dogstatsd_differential.rs | Update imports and batch sampling call site for the refactored driver API. |
| test/antithesis/harness/src/payload/dogstatsd/service_checks.rs | Replace random_choice usage with rand selection APIs and thread RNG through helpers. |
| test/antithesis/harness/src/payload/dogstatsd/metrics.rs | Same as above; also refactors metric extension selection and value-kind selection. |
| test/antithesis/harness/src/payload/dogstatsd/events.rs | Same as above for event option selection and field writing. |
| test/antithesis/harness/src/payload/dogstatsd/common.rs | Make vibe/choice/field helpers RNG-driven and switch selection to rand APIs. |
| test/antithesis/harness/src/payload/dogstatsd.rs | Add byte-limited line/payload writers and proptest invariants for size/newline properties. |
| test/antithesis/harness/src/driver.rs | Change driver from per-line sends to byte-limited payload datagrams, updating stats semantics. |
| test/antithesis/harness/proptest-regressions/payload/dogstatsd.txt | Check in proptest regression seed(s) for reproducibility. |
| test/antithesis/harness/Cargo.toml | Add proptest dev-dependency for the new property tests. |
| Cargo.lock | Record proptest being pulled in (via harness dev-deps). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4b011df to
67ce101
Compare
51945fe to
30e11dd
Compare
67ce101 to
7024db6
Compare
30e11dd to
7ac69cc
Compare
7024db6 to
9d89983
Compare
7ac69cc to
3fe9725
Compare
9d89983 to
d652f5f
Compare
5b84354 to
7d5c1d2
Compare
d652f5f to
f924078
Compare
7d5c1d2 to
0984845
Compare
3436479 to
f08152f
Compare
0984845 to
2452073
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 732b36fc99
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
732b36f to
65c8858
Compare
65c8858 to
896334b
Compare
896334b to
ec739c1
Compare
ec739c1 to
5b529b3
Compare
c727931 to
e8b9907
Compare
e8b9907 to
4b59000
Compare
4b59000 to
3800920
Compare
This commit updates the harness driver to build dogstatsd to a byte limit, in the manner of datadog/lading. I have been unable to investigate SMPTNG-7611 well owing to the error log emission by Datadog Agent. I've added property tests to assert the payload limit is obeyed, accepting that this means making the dogstatsd generator pure with regard to Rng and may not use antithesis SDK's random_* directly.
3800920 to
9fe3971
Compare

Summary
This commit updates the harness driver to build dogstatsd to a byte
limit, in the manner of datadog/lading. I have been unable to
investigate SMPTNG-7611 well owing to the error log emission by Datadog
Agent. I've added property tests to assert the payload limit is obeyed,
accepting that this means making the dogstatsd generator pure with
regard to Rng and may not use antithesis SDK's random_* directly.
I have tweaked also how 'feral' load is produced, making payloads more
compact but also avoiding producing feral load that Datadog Agent will
not outright reject.
Change Type
How did you test this PR?
References
Discovered the following debugging this work:
DataDog/datadog-agent#53170
SMPTNG-761