Skip to content

Improve macOS profiling compile guidance#6002

Open
marcotc wants to merge 1 commit into
masterfrom
marco/macos-profiling-compile-message
Open

Improve macOS profiling compile guidance#6002
marcotc wants to merge 1 commit into
masterfrom
marco/macos-profiling-compile-message

Conversation

@marcotc

@marcotc marcotc commented Jul 6, 2026

Copy link
Copy Markdown
Member

Added explanation on how to compile the profiler for MacOS development to the compilation error message.

Today,

+------------------------------------------------------------------------------+
| Could not compile the Datadog Continuous Profiler because                    |
| macOS is currently not supported by the Datadog Continuous Profiler.         |
|                                                                              |
| The Datadog Continuous Profiler will not be available,                       |
| but all other datadog features will work fine!                               |
|                                                                              |
| Get in touch with us if you're interested in profiling your app!             |
+------------------------------------------------------------------------------+

After this PR:

+------------------------------------------------------------------------------+
| Could not compile the Datadog Continuous Profiler because                    |
| macOS is currently not supported by the Datadog Continuous Profiler.         |
|                                                                              |
| The Datadog Continuous Profiler will not be available,                       |
| but all other datadog features will work fine!                               |
|                                                                              |
| To compile the profiler for development, set                                 |
| `DD_PROFILING_MACOS_TESTING=true` and run `bundle exec rake clean compile`.  |
| See docs/LibdatadogDevelopment.md for more info.                             |
+------------------------------------------------------------------------------+

I think this is more accurate of the desired experience, and prevents developers from having to find the correct way to make changes to the profiler.

Change log entry

No.

@marcotc
marcotc requested review from a team as code owners July 6, 2026 21:47
@marcotc marcotc self-assigned this Jul 6, 2026
@dd-octo-sts dd-octo-sts Bot added the profiling Involves Datadog profiling label Jul 6, 2026
@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Jul 6, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

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

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ec23afa | Docs | Datadog PR Page | Give us feedback!

@pr-commenter

pr-commenter Bot commented Jul 6, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-06 22:11:41

Comparing candidate commit ec23afa in PR branch marco/macos-profiling-compile-message with baseline commit 84b509a in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 1 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 ----------------------------------'

@ivoanjo

ivoanjo commented Jul 7, 2026

Copy link
Copy Markdown
Member

Hmmm... I'm not entirely excited by this approach as this banner/message can be seen by customers in production (not just when doing development), and at this point we're really not intending to support macOS in the profiler outside of local development.

I have been considering for a while an alternative -- our Rakefile could just compile things by default (since the Rakefile is only for development). The reason I didn't do that in the past was that most of the times it was just me on profiling and I didn't want to impact the development experience of other devs in dd-trace-rb, but now what we're using a lot more libdatadog and whatnot, you're often going to need to compile stuff anyway... What do you think of that alternative?

@eregon

eregon commented Jul 10, 2026

Copy link
Copy Markdown
Member

+1 on making it easy to work on the profiler on macOS.

I have been considering for a while an alternative -- our Rakefile could just compile things by default (since the Rakefile is only for development). The reason I didn't do that in the past was that most of the times it was just me on profiling and I didn't want to impact the development experience of other devs in dd-trace-rb, but now what we're using a lot more libdatadog and whatnot, you're often going to need to compile stuff anyway... What do you think of that alternative?

I think this is the way to go.

Agreed the banner shouldn't show dev things when printed in prod, and having part of the banner conditional sounds complicated. Just having the Rakefile cooperate seems best.

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

Labels

profiling Involves Datadog profiling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants