Skip to content

Update common.timing to make tests more deterministic#3397

Merged
jsiirola merged 5 commits intoPyomo:mainfrom
jsiirola:timing-tests
Nov 1, 2024
Merged

Update common.timing to make tests more deterministic#3397
jsiirola merged 5 commits intoPyomo:mainfrom
jsiirola:timing-tests

Conversation

@jsiirola
Copy link
Copy Markdown
Member

Fixes # .

Summary/Motivation:

This has some minor updates to the timing tests to make them more deterministic and hopefully resolve some intermittent test failures.

Changes proposed in this PR:

  • toc() should grab the current time ASAP to avoid timing differences due to context switches while interrogating the stack
  • Extend the switchinterval during timing tests to discourage context switches
  • Add a missing package to the list of expected TPL imports

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.58%. Comparing base (69f1937) to head (4ad110e).
Report is 656 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3397   +/-   ##
=======================================
  Coverage   88.58%   88.58%           
=======================================
  Files         883      883           
  Lines      100289   100289           
=======================================
  Hits        88841    88841           
  Misses      11448    11448           
Flag Coverage Δ
linux 86.04% <100.00%> (ø)
osx 76.03% <100.00%> (ø)
other 86.53% <100.00%> (-0.01%) ⬇️
win 84.38% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jsiirola jsiirola merged commit 8031f2b into Pyomo:main Nov 1, 2024
@jsiirola jsiirola deleted the timing-tests branch November 1, 2024 03:14
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.

2 participants