[NO-TICKET] Allow lowering profiling cpu sampling interval#5424
Conversation
**What does this PR do?** This PR adds an experimental setting `experimental_cpu_sampling_interval_ms` to the profiler's advanced configuration that allows lowering the CPU sampling interval from the default 10ms down to 1ms. **Motivation:** Fixes #5393 Some users need higher resolution CPU profiling data and are willing to accept increased overhead in exchange for more accurate sampling. **Additional Notes:** N/A **How to test the change?** I've added specs to cover the change, although the actual sampling rate is not tested integration-style. I somewhat hesitated in adding that since it can be a bit flaky if e.g. the profiler can't sample fast enough in CI.
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR introduces 6 partially typed methods, and clears 6 partially typed methods. It increases the percentage of typed methods from 61.1% to 61.12% (+0.02%). Partially typed methods (+6-6)❌ Introduced:If you believe a method or an attribute is rightfully untyped or partially typed, you can add |
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: a163de4 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
BenchmarksBenchmark execution time: 2026-03-10 15:55:42 Comparing candidate commit a163de4 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 0 unstable metrics.
|
|
We might iterate a bit on this one still based of feedback, but for now merging this first version :) |
|
(Last-minute tweaking to name, the old one sounded clunky; also updated change log entry to match) |
What does this PR do?
This PR adds an experimental setting
experimental_cpu_sampling_interval_msto the profiler's advanced configuration that allows lowering the CPU sampling interval from the default 10ms down to 1ms.Motivation:
Fixes #5393
Some users need higher resolution CPU profiling data and are willing to accept increased overhead in exchange for more accurate sampling.
Change log entry
Yes. Allow lowering profiling cpu sampling interval
Additional Notes:
N/A
How to test the change?
I've added specs to cover the change, although the actual sampling rate is not tested integration-style. I somewhat hesitated in adding that since it can be a bit flaky if e.g. the profiler can't sample fast enough in CI.