-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Replace DiagnosticId
by DiagnosticPath
#9266
Conversation
Hey, can you resolve merge conflicts? I'd like to get this in and at first glance this seems well-made. |
d81871c
to
0de89b5
Compare
I've resolved merge conflicts. Examples seem to work. |
} | ||
|
||
/// Create a new `DiagnosticPath` from an iterator over components. | ||
pub fn from_components<'a>(components: impl IntoIterator<Item = &'a str>) -> DiagnosticPath { |
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.
Nit: can we swap "components" here to "parts" to be less confusing in a Bevy context?
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.
I suggest from_sections
Objective
Implements #9216
Solution
DiagnosticId
byDiagnosticPath
. It's pre-hashed usingconst-fnv1a-hash
crate, so it's possible to create path in const contexts.Changelog
Replaced
DiagnosticId
byDiagnosticPath
Set default history length to 120 measurements (2 seconds on 60 fps).
I've noticed hardcoded constant 20 everywhere and decided to change it to
DEFAULT_MAX_HISTORY_LENGTH
, which is set to new diagnostics by default. To override it, usewith_max_history_length
.Migration Guide