-
Notifications
You must be signed in to change notification settings - Fork 754
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
Benches for reloadable collectors #1090
Benches for reloadable collectors #1090
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
It's definitely on my radar to look into potential optimizations for reload
's common case performance (i.e., when the subscriber isn't currently being reloaded) — maybe a sharded lock is worth trying?
It looks like rustfmt
checks are failing on this branch. Mind running rustfmt?
Done. I keep forgetting that, very annoying. |
I did a quick test with
|
Mm, that's pretty unsurprising. In general, I'd recommend users who are more concerned with performance than with their number of dependencies to enable the |
Should I try to solidify that |
…oadable collector
…-reloadable-collector
…-reloadable-collector
The warnings about dead code in the `support` module are 'fixed' here by overriding Clippy which is pretty sad. Not sure what to do about it though other than moving the support code to its own crate (overkill?).
Motivation
The docs state that using the
reload
module inflicts a performance penalty but there was no further data about how big the penalty is. This PR adds_reload
variants to the filter benchmarks. Results are a bit inconclusive but the tl;dr is "yes, there is a performance impact and yes, in some cases it's significant. Generally the more complex the collector the less it matters.".The benchmarks after this PR are a bit noisy; happy to rework this but wasn't sure what the preferred way was. There's already a fair bit of duplication in the benchmarks but this PR isn't helping with that.