Skip to content

chore(antithesis): dogstatsd generation with byte limit#1974

Merged
blt merged 1 commit into
mainfrom
blt/chore_antithesis_dogstatsd_line_and_payload_generators
Jul 9, 2026
Merged

chore(antithesis): dogstatsd generation with byte limit#1974
blt merged 1 commit into
mainfrom
blt/chore_antithesis_dogstatsd_line_and_payload_generators

Conversation

@blt

@blt blt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

References

Discovered the following debugging this work:

DataDog/datadog-agent#53170
SMPTNG-761

@pr-commenter

pr-commenter Bot commented Jul 2, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: dff1654 · Comparison: 9fe3971 · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 41.59 MiB (baseline) vs 41.59 MiB (comparison)
Size Change: +0 B (+0.00%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
anon.104b1f618a14d6d60f2ebe1b651d81f5.1.llvm.16633083741012894223 +130 B 1
anon.104b1f618a14d6d60f2ebe1b651d81f5.1.llvm.10234976937094269617 -130 B 1
anon.104b1f618a14d6d60f2ebe1b651d81f5.4.llvm.16633083741012894223 +115 B 1
anon.104b1f618a14d6d60f2ebe1b651d81f5.4.llvm.10234976937094269617 -115 B 1
anon.104b1f618a14d6d60f2ebe1b651d81f5.3.llvm.16633083741012894223 +109 B 1
anon.104b1f618a14d6d60f2ebe1b651d81f5.3.llvm.10234976937094269617 -109 B 1
anon.104b1f618a14d6d60f2ebe1b651d81f5.0.llvm.16633083741012894223 +97 B 1
anon.104b1f618a14d6d60f2ebe1b651d81f5.0.llvm.10234976937094269617 -97 B 1
anon.104b1f618a14d6d60f2ebe1b651d81f5.2.llvm.16633083741012894223 +95 B 1
anon.104b1f618a14d6d60f2ebe1b651d81f5.2.llvm.10234976937094269617 -95 B 1
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW]    +130  [NEW]     +40    anon.104b1f618a14d6d60f2ebe1b651d81f5.1.llvm.16633083741012894223
  [NEW]    +115  [NEW]     +25    anon.104b1f618a14d6d60f2ebe1b651d81f5.4.llvm.16633083741012894223
  [NEW]    +109  [NEW]     +19    anon.104b1f618a14d6d60f2ebe1b651d81f5.3.llvm.16633083741012894223
  [NEW]     +97  [NEW]      +7    anon.104b1f618a14d6d60f2ebe1b651d81f5.0.llvm.16633083741012894223
  [NEW]     +95  [NEW]      +5    anon.104b1f618a14d6d60f2ebe1b651d81f5.2.llvm.16633083741012894223
  [DEL]     -95  [DEL]      -5    anon.104b1f618a14d6d60f2ebe1b651d81f5.2.llvm.10234976937094269617
  [DEL]     -97  [DEL]      -7    anon.104b1f618a14d6d60f2ebe1b651d81f5.0.llvm.10234976937094269617
  [DEL]    -109  [DEL]     -19    anon.104b1f618a14d6d60f2ebe1b651d81f5.3.llvm.10234976937094269617
  [DEL]    -115  [DEL]     -25    anon.104b1f618a14d6d60f2ebe1b651d81f5.4.llvm.10234976937094269617
  [DEL]    -130  [DEL]     -40    anon.104b1f618a14d6d60f2ebe1b651d81f5.1.llvm.10234976937094269617
  [ = ]       0  [ = ]       0    TOTAL

@pr-commenter

pr-commenter Bot commented Jul 2, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: ebc88cc8-6790-4229-b5a5-577412d6081c
Baseline: dff16546 · Comparison: 9fe3971b · diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (5)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
quality_gates_rss_dsd_medium memory ⚪ +0.18 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ -0.03 metrics profiles logs
quality_gates_rss_idle memory ⚪ -0.09 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ -0.10 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ -0.14 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 132 MiB ≤ 140 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 43.2 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 65.1 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 192 MiB ≤ 200 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 29 MiB ≤ 40 MiB metrics profiles logs
Explanation

A 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 (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and write_payload to 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.

Comment thread test/antithesis/harness/src/driver.rs Outdated
Comment thread test/antithesis/harness/src/driver.rs Outdated
Comment thread test/antithesis/harness/src/payload/dogstatsd/common.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/common.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/metrics.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/metrics.rs Outdated
Comment thread test/antithesis/harness/src/payload/dogstatsd/service_checks.rs Outdated
Comment thread test/antithesis/harness/src/payload/dogstatsd/events.rs Outdated
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from 4b011df to 67ce101 Compare July 2, 2026 13:44
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 51945fe to 30e11dd Compare July 2, 2026 13:44
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from 67ce101 to 7024db6 Compare July 2, 2026 16:57
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 30e11dd to 7ac69cc Compare July 2, 2026 16:58
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from 7024db6 to 9d89983 Compare July 2, 2026 21:11
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 7ac69cc to 3fe9725 Compare July 2, 2026 21:11
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from 9d89983 to d652f5f Compare July 2, 2026 21:40
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch 2 times, most recently from 5b84354 to 7d5c1d2 Compare July 2, 2026 22:08
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch from d652f5f to f924078 Compare July 2, 2026 22:08
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 7d5c1d2 to 0984845 Compare July 2, 2026 22:17
@blt blt force-pushed the blt/chore_antithesis_add_pyld25_series_are_not_empty branch 2 times, most recently from 3436479 to f08152f Compare July 2, 2026 22:41
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 0984845 to 2452073 Compare July 2, 2026 22:41
@blt blt marked this pull request as ready for review July 2, 2026 22:53
@blt blt requested a review from a team as a code owner July 2, 2026 22:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread test/antithesis/harness/src/payload/dogstatsd/common.rs Outdated
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 732b36f to 65c8858 Compare July 8, 2026 00:59
Copilot AI review requested due to automatic review settings July 8, 2026 01:28
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 65c8858 to 896334b Compare July 8, 2026 01:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.

Comment thread test/antithesis/scenarios/general/src/bin/parallel_driver_send_dogstatsd.rs Outdated
Comment thread test/antithesis/harness/src/payload/dogstatsd.rs Outdated
Comment thread test/antithesis/harness/src/payload/dogstatsd.rs Outdated
Copilot AI review requested due to automatic review settings July 8, 2026 02:09
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 896334b to ec739c1 Compare July 8, 2026 02:09
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from ec739c1 to 5b529b3 Compare July 8, 2026 02:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 8 comments.

Comment thread test/antithesis/harness/src/payload/dogstatsd/common.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/common.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/service_checks.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/events.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/metrics.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/metrics.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd.rs Outdated
Comment thread test/antithesis/harness/src/driver.rs
Copilot AI review requested due to automatic review settings July 8, 2026 02:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.

Comment thread test/antithesis/scenarios/general/src/bin/parallel_driver_send_dogstatsd.rs Outdated
Comment thread test/antithesis/harness/src/payload/dogstatsd.rs Outdated
@blt blt changed the base branch from blt/chore_antithesis_add_pyld25_series_are_not_empty to graphite-base/1974 July 8, 2026 19:01
Copilot AI review requested due to automatic review settings July 8, 2026 19:01
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch 2 times, most recently from c727931 to e8b9907 Compare July 8, 2026 19:01
@blt blt force-pushed the graphite-base/1974 branch from b7563e0 to dff1654 Compare July 8, 2026 19:01
@graphite-app graphite-app Bot changed the base branch from graphite-base/1974 to main July 8, 2026 19:02
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from e8b9907 to 4b59000 Compare July 8, 2026 19:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 9 comments.

Comment thread test/antithesis/harness/src/driver.rs
Comment thread test/antithesis/harness/src/driver.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/common.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/common.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/common.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/events.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/service_checks.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/metrics.rs
Comment thread test/antithesis/harness/src/payload/dogstatsd/metrics.rs
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 4b59000 to 3800920 Compare July 8, 2026 20:28
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.
@blt blt force-pushed the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch from 3800920 to 9fe3971 Compare July 8, 2026 21:26
@blt blt requested a review from tobz July 8, 2026 21:36
@blt blt merged commit cccc3c7 into main Jul 9, 2026
83 checks passed
@blt blt deleted the blt/chore_antithesis_dogstatsd_line_and_payload_generators branch July 9, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test All things testing: unit/integration, correctness, SMP regression, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants