Skip to content

make time measurements monotonic #231

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

Merged
merged 1 commit into from
Sep 14, 2021
Merged

make time measurements monotonic #231

merged 1 commit into from
Sep 14, 2021

Conversation

dnozay
Copy link
Member

@dnozay dnozay commented Nov 16, 2020

  • time.time() is the system time. "it's great" (tm)
    however it is not reliable for measuring time spent.
    it gives you the "current" time, but oh... time can move backwards
    (thanks NTP).

  • time.monotonic() is a monotonic time source. "it's great" (tm)
    it only goes forward, making measurements a peach.
    however it cannot be used as a reference point.

- `time.time()` is the system time. "it's great" (tm)
  however it is not reliable for measuring time spent.
  it gives you the "current" time, but oh... time can move backwards
  (thanks NTP).

- `time.monotonic()` is a monotonic time source. "it's great" (tm)
  it only goes forward, making measurements a peach.
  however it cannot be used as a reference point.
@coveralls
Copy link

coveralls commented Nov 16, 2020

Coverage Status

Coverage increased (+0.0008%) to 99.612% when pulling 93f4c4b on dnozay/monotonic into 7d0a0e7 on master.

@codecov-io
Copy link

codecov-io commented Nov 16, 2020

Codecov Report

Merging #231 (93f4c4b) into master (7d0a0e7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #231   +/-   ##
=======================================
  Coverage   99.61%   99.61%           
=======================================
  Files          15       15           
  Lines        1566     1569    +3     
=======================================
+ Hits         1560     1563    +3     
  Misses          6        6           
Impacted Files Coverage Δ
xmlrunner/builder.py 100.00% <100.00%> (ø)
xmlrunner/runner.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d0a0e7...93f4c4b. Read the comment docs.

@dnozay dnozay merged commit 531da78 into master Sep 14, 2021
@dnozay dnozay deleted the dnozay/monotonic branch January 19, 2022 15:33
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