Skip to content

Compute wall_time using the monotonic time.perf_counter()#3825

Merged
mrmundt merged 1 commit intoPyomo:mainfrom
hartelys:main
Jan 26, 2026
Merged

Compute wall_time using the monotonic time.perf_counter()#3825
mrmundt merged 1 commit intoPyomo:mainfrom
hartelys:main

Conversation

@hartelys
Copy link
Copy Markdown
Contributor

@hartelys hartelys commented Jan 26, 2026

Fixes #3808

Summary/Motivation:

This PR is intended to solve the fact that the measured wall_time is sometimes negative due to the usage of datetime.datetime.now(). It resolves #3808

Changes proposed in this PR:

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.

@jsiirola jsiirola changed the title [edit] wall_time computed using the monotonic time.perf_counter() Compute wall_time using the monotonic time.perf_counter() Jan 26, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.40%. Comparing base (9702ff1) to head (757180a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3825      +/-   ##
==========================================
- Coverage   89.45%   89.40%   -0.06%     
==========================================
  Files         905      903       -2     
  Lines      105485   105380     -105     
==========================================
- Hits        94359    94212     -147     
- Misses      11126    11168      +42     
Flag Coverage Δ
builders 29.15% <26.08%> (+<0.01%) ⬆️
default 86.02% <100.00%> (?)
expensive 34.85% <26.08%> (?)
linux 86.76% <78.26%> (-2.46%) ⬇️
linux_other 86.76% <78.26%> (+<0.01%) ⬆️
osx 82.91% <78.26%> (+<0.01%) ⬆️
win 84.98% <78.26%> (-0.01%) ⬇️
win_other 84.98% <78.26%> (-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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mrmundt mrmundt merged commit bb1203d into Pyomo:main Jan 26, 2026
64 of 65 checks passed
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.

Negative wall_time exception

4 participants