-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: Remove explicit lazy_static in project #11243
Conversation
This commit removes the use of lazy_static! in favor of OnceCell's Lazy. They are functionally similar although OnceCell's implementation has better characteristics in contended situations. This change was motivated by examination of the profiling results from #11206 where a regex to do with date parsing was seen before a CPU quiet period. It's unknown if this change will materially impact that, however we should no longer use lazy_static and so the time seemed ripe. Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
✔️ Deploy Preview for vector-project canceled. 🔨 Explore the source changes: d86a2f0 🔍 Inspect the deploy log: https://app.netlify.com/sites/vector-project/deploys/6201f642ef565100089a5f30 |
Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
Soak Test ResultsBaseline: 1bd5526 ExplanationA soak test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine, quickly, if vector performance is changed and to what degree by a pull request. Where appropriate units are scaled per-core. The table below, if present, lists those experiments that have experienced a statistically significant change in their throughput performance between baseline and comparision SHAs, with 90.0% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±8.87% change in mean throughput are discarded. An experiment is erratic if its coefficient of variation is greater than 0.3. The abbreviated table will be omitted if no interesting changes are observed. No interesting changes with confidence ≥ 90.00%: Fine details of change detection per experiment.
Fine details of each soak run.
|
use glob::glob; | ||
use indexmap::IndexMap; | ||
use lazy_static::lazy_static; | ||
|
||
use super::{ | ||
builder::ConfigBuilder, format, validation, vars, ComponentKey, Config, ConfigPath, Format, | ||
FormatHint, TransformOuter, | ||
}; | ||
use crate::signal; | ||
use glob::glob; | ||
use indexmap::IndexMap; | ||
use once_cell::sync::Lazy; |
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.
Seems like some unintended changes got pulled in. I've seen this in other PRs as well, I wonder if it's because of a manually ran rustfmt
configuration (via #10496) doesn't match people's editor configs.
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.
Yeah that seems likely. Might be worth having people take a look at their local configs and try to align them with what we did there.
use glob::glob; | ||
use indexmap::IndexMap; | ||
use lazy_static::lazy_static; | ||
|
||
use super::{ | ||
builder::ConfigBuilder, format, validation, vars, ComponentKey, Config, ConfigPath, Format, | ||
FormatHint, TransformOuter, | ||
}; | ||
use crate::signal; | ||
use glob::glob; | ||
use indexmap::IndexMap; | ||
use once_cell::sync::Lazy; |
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.
Yeah that seems likely. Might be worth having people take a look at their local configs and try to align them with what we did there.
This commit removes the use of lazy_static! in favor of OnceCell's Lazy. They
are functionally similar although OnceCell's implementation has better
characteristics in contended situations. This change was motivated by
examination of the profiling results from #11206 where a regex to do with date
parsing was seen before a CPU quiet period. It's unknown if this change will
materially impact that, however we should no longer use lazy_static and so the
time seemed ripe.
Signed-off-by: Brian L. Troutwine brian@troutwine.us