Skip to content

feat(profiling): enable I/O profiling by default - #4152

Draft
realFlowControl wants to merge 2 commits into
masterfrom
florian/prof-15878-default-enable-io-profiling
Draft

feat(profiling): enable I/O profiling by default#4152
realFlowControl wants to merge 2 commits into
masterfrom
florian/prof-15878-default-enable-io-profiling

Conversation

@realFlowControl

Copy link
Copy Markdown
Member

Description

Default-enable PHP I/O profiling and promote DD_PROFILING_IO_ENABLED as the primary setting while keeping DD_PROFILING_EXPERIMENTAL_IO_ENABLED as an alias.

Add a MINIT-only system configuration mode so request-level SAPI, FPM, and directory configuration cannot change process-wide I/O hook installation after startup.

Jira: https://datadoghq.atlassian.net/browse/PROF-15878

Testing

  • cargo test --no-default-features --features profiling,test
  • Profiler PHPT suite: 37 passed, 11 skipped

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@github-actions github-actions Bot added the profiling Relates to the Continuous Profiler label Sep 1, 2026
@datadog-official

datadog-official Bot commented Sep 1, 2026

Copy link
Copy Markdown

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

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

🚦 9 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | check-big-regressions — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-php | profiling tests: [8.0, amd64, php-, _centos-7] — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-php | profiling tests: [8.0, arm64, php-, _centos-7] — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

View all 9 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.63% (-0.03%)

Useful? React with 👍 / 👎

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

@pr-commenter

pr-commenter Bot commented Sep 1, 2026

Copy link
Copy Markdown

Benchmarks [ profiler ]

Benchmark execution time: 2026-09-02 15:01:09

Comparing candidate commit 63294b0 in PR branch florian/prof-15878-default-enable-io-profiling with baseline commit 2ad9386 in branch master.

Found 0 performance improvements and 5 performance regressions! Performance is the same for 22 metrics, 9 unstable metrics.

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 ----------------------------------'

scenario:php-profiler-exceptions-with-profiler

  • 🟥 execution_time [+4.168ms; +5.817ms] or [+4.253%; +5.936%]

scenario:php-profiler-timeline-memory-with-profiler

  • 🟥 cpu_user_time [+63.298ms; +127.575ms] or [+4.528%; +9.126%]
  • 🟥 execution_time [+40.042ms; +123.300ms] or [+3.499%; +10.773%]

scenario:php-profiler-timeline-memory-with-profiler-and-timeline

  • 🟥 cpu_user_time [+154.162ms; +248.836ms] or [+10.109%; +16.318%]
  • 🟥 execution_time [+131.978ms; +151.543ms] or [+9.817%; +11.272%]

@pr-commenter

pr-commenter Bot commented Sep 1, 2026

Copy link
Copy Markdown

Benchmarks [ tracer ]

Benchmark execution time: 2026-09-02 15:52:20

Comparing candidate commit 63294b0 in PR branch florian/prof-15878-default-enable-io-profiling with baseline commit 2ad9386 in branch master.

Found 1 performance improvements and 3 performance regressions! Performance is the same for 185 metrics, 5 unstable metrics.

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 ----------------------------------'

scenario:SamplingRuleMatchingBench/benchRegexMatching3-opcache

  • 🟥 execution_time [+11.807µs; +11.970µs] or [+710.389%; +720.199%]

scenario:SpanBench/benchDatadogAPI-opcache

  • 🟥 execution_time [+101.273µs; +102.963µs] or [+140.233%; +142.573%]

scenario:SpanBench/benchOpenTelemetryAPI-opcache

  • 🟩 mem_peak [-4.773MB; -1.001MB] or [-10.305%; -2.160%]

scenario:TraceSerializationBench/benchSerializeTrace-opcache

  • 🟥 execution_time [+1.252ms; +1.269ms] or [+333.076%; +337.680%]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

profiling Relates to the Continuous Profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant