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

ref: Use coarsetime consistently #366

Merged
merged 3 commits into from
May 17, 2024
Merged

ref: Use coarsetime consistently #366

merged 3 commits into from
May 17, 2024

Conversation

untitaker
Copy link
Member

@untitaker untitaker commented May 17, 2024

coarsetime is a crate that allows you to fetch the current time with an
in-memory cache. This tends to be faster than actually getting the
current time.

Previously we were using Instant::now_without_update, which does not
actually give us any perf benefits. Let's use ::recent everywhere and
update the timestamp in the StreamProcessor.

@untitaker untitaker requested review from a team as code owners May 17, 2024 13:26
@untitaker untitaker requested a review from a team May 17, 2024 13:26
untitaker added a commit to getsentry/snuba that referenced this pull request May 17, 2024
Changes necessary for getsentry/arroyo#366, and
additional timers for get_str_config, since that one acquires multiple
global locks and might impact concurrency.
coarsetime is a crate that allows you to fetch the current time with an
in-memory cache. This tends to be faster than actually getting the
current time.

Previously we were using Instant::now_without_update, which does not
actually give us any perf benefits. Let's use ::recent everywhere and
update the timestamp in the StreamProcessor.
@untitaker untitaker changed the title ref/coarsetime ref: Use coarsetime consistently May 17, 2024
@loewenheim
Copy link
Contributor

quanta is another alternative, but I can't tell you which is better.

@untitaker
Copy link
Member Author

quanta is another alternative, but I can't tell you which is better.

I found that all timing-related things are now gone from profiles, so I think it's good enough. quanta looks like it has a quite large deptree

@untitaker untitaker merged commit 41457bf into main May 17, 2024
11 checks passed
@untitaker untitaker deleted the ref/coarsetime branch May 17, 2024 13:51
untitaker added a commit to getsentry/snuba that referenced this pull request May 17, 2024
* ref: Upgrade arroyo, use coarsetime

Changes necessary for getsentry/arroyo#366, and
additional timers for get_str_config, since that one acquires multiple
global locks and might impact concurrency.

* bump arroyo

* update arroyo again

* remove another close

* fix tests again
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