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

Monotonic time #1126

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

pboling
Copy link

@pboling pboling commented Mar 7, 2025

Important background: Monotonic time is the "correct" way to calculate elapsed time in Ruby:
https://blog.dnsimple.com/2018/03/elapsed-time-with-ruby-the-right-way/

I do not understand the rubocop failure in CI, because when I run locally there are no violations:

❯ bundle exec rubocop -a
Inspecting 111 files
...............................................................................................................

111 files inspected, no offenses detected

Same result when run with bundle exec rake rubocop as it is in CI.

CC @ilyazub

pboling added 4 commits March 6, 2025 17:37
Previously some gems masked a bug in Rails v6 and v7 where `logger` was not required,
  plugging the hole by requiring it themselves.
Because this app is pinned to Rails v6.1, we must require logger manually.
In order to not be reliant on other libraries to fix the bug in Rails for us, we do it too.
See: https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror
- explicit proxy for determining if running in parallel
- `created_at` / `timestamp` is for wall clock time (for humans)
- `started_at` is for monotonic / elapsed time (for computers)
@pboling
Copy link
Author

pboling commented Mar 7, 2025

This is now ready for review @amatsuda @PragTob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant