test: Improve profiling tests#8169
Conversation
Overall package sizeSelf size: 5.67 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: f7ddd34 | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc962b5eb3
ℹ️ 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".
| expectedMessageCount: Infinity, | ||
| }) | ||
| await Promise.all([checkProfiles(agent, proc, timeout), expectTimeout(checkTelemetry)]) | ||
| await Promise.all([checkProfiles(agent, proc, timeout), expectTimeout(checkTelemetry, true)]) |
There was a problem hiding this comment.
Do not swallow profiler telemetry assertion failures
When a generate-metrics payload with namespace profilers arrives, the new fn throws, but assertTelemetryReceived only reports that as timeout, additionally: ... after the timeout; passing true to expectTimeout explicitly treats those assertion-bearing timeouts as success. This means the test now passes even in the exact regression it is trying to catch, so profiler telemetry can be emitted with DD_INJECTION_ENABLED absent without failing the test.
Useful? React with 👍 / 👎.
szegedi
left a comment
There was a problem hiding this comment.
I was just recently also fixing a flake with telemetry, and I thought there we already started filtering by namespace?
|
Yes you’re right. I thought I could filter non profiler namespace metrics during shutdown, but that is not the real issue. |
BenchmarksBenchmark execution time: 2026-04-30 08:48:02 Comparing candidate commit f7ddd34 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1342 metrics, 102 unstable metrics. |
* test: Improve profiling tests
What does this PR do?
Address some profiling flaky tests:
@datadog/pprofso add a quick check to skip the spec when the native library is unavailable.Motivation
Address some profiling flaky tests