Skip to content

[benchmark only, do not merge] perf(datastreams): size Kafka headers in a single loop - #21972

Closed
labbati wants to merge 1 commit into
mainfrom
labbati/dsm2-827-python-cheaper-headers-byte-size
Closed

labbati wants to merge 1 commit into
mainfrom
labbati/dsm2-827-python-cheaper-headers-byte-size

Conversation

@labbati

@labbati labbati commented Nov 20, 2026

Copy link
Copy Markdown
Member

Benchmark-only isolation of one change from #21963 to measure it alone in Speedlab (DSM2-794). Will be closed.

@linear-code

linear-code Bot commented Nov 20, 2026

Copy link
Copy Markdown

DSM2-827

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

ddtrace/internal/datastreams/kafka.py                                   @DataDog/data-streams-monitoring
tests/contrib/kafka/test_kafka_dsm.py                                   @DataDog/data-streams-monitoring

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 22 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 22 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=103)
ddtrace.llmobs._integrations.base -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=101)
ddtrace.llmobs._integrations.bedrock_agents -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=101)
ddtrace.internal.span_bus -×-> ddtrace._trace.span  (internal-core -> product:tracing, score=35)
ddtrace.llmobs._llmobs -×-> ddtrace._trace.span  (product:llmobs -> product:tracing, score=33)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@datadog-official

datadog-official Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Pipelines  Tests

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 2 Pipeline jobs failed

Changelog | Validate changelog

View more details · View in GitHub Actions

pr-name | pr_name_lint

View more details · View in GitHub Actions

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2f41676 | Docs | View more details | Give us feedback!

@pr-commenter

pr-commenter Bot commented Nov 20, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-11-20 13:44:37

Comparing candidate commit 2f41676 in PR branch labbati/dsm2-827-python-cheaper-headers-byte-size with baseline commit 8918a5a in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 586 metrics, 10 unstable metrics, 1 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:coreapiscenario-context_with_data_listeners

  • unstable execution_time [-519.545ns; +900.766ns] or [-4.888%; +8.474%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-39.671ns; +36.103ns] or [-6.160%; +5.606%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1501.527ns; +2200.126ns] or [-7.583%; +11.111%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1862.204ns; +1611.940ns] or [-9.680%; +8.379%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-214.419ns; +526.921ns] or [-5.074%; +12.469%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-99.436ns; +344.062ns] or [-3.772%; +13.050%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-81.322ns; +99.338ns] or [-5.926%; +7.239%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-4558.895ns; +4392.353ns] or [-9.389%; +9.046%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-1012.767ns; +865.519ns] or [-9.815%; +8.388%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-55327.651ns; +56935.680ns] or [-9.395%; +9.668%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

Known flaky benchmarks without significant changes:

  • scenario:packagespackageforrootmodulemapping-cache_off

labbati commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Benchmark-only isolation measured in Speedlab (DSM2-794); closing.

@labbati labbati closed this Nov 20, 2026
@labbati
labbati deleted the labbati/dsm2-827-python-cheaper-headers-byte-size branch November 20, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant