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

Use direct nanosecond operations in quanta, bring speed back to baseline #190

Merged
merged 3 commits into from
May 28, 2023

Conversation

antifuchs
Copy link
Collaborator

This uses metrics-rs/quanta#86 to avoid roundtripping nanosecond counts through Duration, which does a bunch of integer math on construction and deconstruction, which we don't even need (unless we exceed the 270 years of governor's useful operational uptime).

In benchmarks, this brings speeds back to the baseline pre-quanta-0.11 (see #175)

@antifuchs
Copy link
Collaborator Author

bors merge

@codecov
Copy link

codecov bot commented May 28, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (78ad701) 97.69% compared to head (9c24837) 97.69%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #190   +/-   ##
=======================================
  Coverage   97.69%   97.69%           
=======================================
  Files          31       31           
  Lines        2208     2208           
=======================================
  Hits         2157     2157           
  Misses         51       51           
Impacted Files Coverage Δ
governor/src/clock/quanta.rs 98.52% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bors
Copy link
Contributor

bors bot commented May 28, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 590197f into master May 28, 2023
@bors bors bot deleted the faster-quanta branch May 28, 2023 22:56
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.

1 participant