Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make timing tests compare to upper / lower bounds #2068

Conversation

pmolodo
Copy link
Contributor

@pmolodo pmolodo commented Oct 20, 2022

Description of Change(s)

When running tests in parallel, we get intermittent failures of
timing related tests due to the elapsed time being outstide of the
allowed range.

However, this could just be due to thread scheduling issues, as
an indeterminate amount of time could pass between the recorded trace
and the standard library call which was used as "ground truth".

Now, I bracket the trace records on both sides with standard library
timing calls, to provide expected upper and lower bounds, which should
be more forgiving of randomness from thread scheduling.

A follow up to changes in:

cadce6f - Avoid hard-coded comparisons for timing tests

Fixes Issue(s)

  • Intermittent failures of testTrace and TfStopwatch tests when running tests with many processes

  • I have submitted a signed Contributor License Agreement

@pmolodo pmolodo force-pushed the pr/testTrace-multiprocess-tolerant branch 2 times, most recently from c4af8ea to e8f4b64 Compare October 21, 2022 02:51
When running tests in parallel, we get intermittent failures of
timing related tests due to the elapsed time being outstide of the
allowed range.

However, this could just be due to thread scheduling issues, as
an indeterminate amount of time could pass between the recorded trace
and the standard library call which was used as "ground truth".

Now, I bracket the trace records on both sides with standard library
timing calls, to provide expected upper and lower bounds, which should
be more forgiving of randomness from thread scheduling.

A follow up to changes in:

    Avoid hard-coded comparisons for timing tests
    cadce6f
@pmolodo pmolodo force-pushed the pr/testTrace-multiprocess-tolerant branch from e8f4b64 to 98d6b07 Compare October 21, 2022 02:52
@pmolodo pmolodo changed the title [trace] make testTrace more reliable when running multiprocess Make timing tests compare to upper / lower bounds Oct 21, 2022
@tallytalwar
Copy link
Contributor

Filed as internal issue #USD-7727

@pixar-oss pixar-oss merged commit bf67dac into PixarAnimationStudios:dev Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants