Skip to content

test(profiling): relax wall time assertions in test_accuracy_stack#17185

Open
KowalskiThomas wants to merge 1 commit intomainfrom
dd/kowalski/relax-cpu-wall-time-assertions
Open

test(profiling): relax wall time assertions in test_accuracy_stack#17185
KowalskiThomas wants to merge 1 commit intomainfrom
dd/kowalski/relax-cpu-wall-time-assertions

Conversation

@KowalskiThomas
Copy link
Copy Markdown
Contributor

@KowalskiThomas KowalskiThomas commented Mar 30, 2026

Description

This fixes test_accuracy_stack by relaxing the accuracy constraint on wall time (from 10% margin to 30%). Whereas CPU time is almost guaranteed (computed by taking Thread clock's elapsed time), wall time is not as OS scheduling can play a role in making certain Threads take longer to execute a certain amount of CPU time than expected. (I have a feeling this is worse in CI, as I can't reproduce locally...)

On the other hand, I also changed the test so we make sure the wall time is never less than what we expect -- this should never happen and would show a correctness problem.

@datadog-official
Copy link
Copy Markdown
Contributor

View session in Datadog

Bits Dev status: ✅ Done

CI Auto-fix: Disabled | Enable

Comment @DataDog to request changes

@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

I can only run on private repositories.

@KowalskiThomas KowalskiThomas added changelog/no-changelog A changelog entry is not required for this PR. Profiling Continous Profling labels Mar 30, 2026
@cit-pr-commenter-54b7da
Copy link
Copy Markdown

Codeowners resolved as

tests/profiling/test_accuracy.py                                        @DataDog/profiling-python

@KowalskiThomas KowalskiThomas force-pushed the dd/kowalski/relax-cpu-wall-time-assertions branch from 1f56598 to f823fd4 Compare March 30, 2026 10:38
@KowalskiThomas KowalskiThomas marked this pull request as ready for review March 30, 2026 10:38
@KowalskiThomas KowalskiThomas requested a review from a team as a code owner March 30, 2026 10:38
@KowalskiThomas KowalskiThomas changed the title test(profiling): relax wall time assertions in accuracy test test(profiling): relax wall time assertions in test_accuracy_stack Mar 30, 2026
@datadog-datadog-prod-us1

This comment has been minimized.

Co-authored-by: KowalskiThomas <14239160+KowalskiThomas@users.noreply.github.com>
@KowalskiThomas KowalskiThomas force-pushed the dd/kowalski/relax-cpu-wall-time-assertions branch from f823fd4 to 94ca9f5 Compare March 30, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bits AI changelog/no-changelog A changelog entry is not required for this PR. Profiling Continous Profling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant