-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
added frame count to FrameTimeDiagnosticsPlugin #678
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.
Looks good and simple enough to include to me. Good improvement.
.add_system(Self::diagnostic_system.system()); | ||
} | ||
} | ||
|
||
impl FrameTimeDiagnosticsPlugin { | ||
pub const FPS: DiagnosticId = DiagnosticId::from_u128(288146834822086093791974408528866909483); | ||
pub const FRAME_COUNT: DiagnosticId = | ||
DiagnosticId::from_u128(54021991829115352065418785002088010277); |
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 think id prefer a fully-random uuid just so these are more distinguishable when printed. I generated one for you :)
73441630925388532774622109383099159699
if time.delta_seconds_f64 == 0.0 { | ||
return; | ||
} | ||
|
||
state.frame_count += 1.0; | ||
diagnostics.add_measurement(Self::FRAME_COUNT, state.frame_count); |
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 think we should probably move this above the time.delta_seconds_f64 == 0.0
check. A frame still happens even if the delta time is 0.
added frame count to FrameTimeDiagnosticsPlugin
Just out of curiosity, why use an f64 instead of a u64 for the frame count (to avoid precision stuff)? |
All diagnostics are saved as |
@mockersf oh okay, thank you |
Original reasoning: #678 (comment) That reasoning doesn't seem valid IMO since eventually +1 will do nothing. Using an integer is more intuitive and will wrap around which is probably better than getting stuck.
Original reasoning: bevyengine#678 (comment) That reasoning doesn't seem valid IMO since eventually +1 will do nothing. Using an integer is more intuitive and will wrap around which is probably better than getting stuck.
Original reasoning: bevyengine#678 (comment) That reasoning doesn't seem valid IMO since eventually +1 will do nothing. Using an integer is more intuitive and will wrap around which is probably better than getting stuck.
Original reasoning: bevyengine#678 (comment) That reasoning doesn't seem valid IMO since eventually +1 will do nothing. Using an integer is more intuitive and will wrap around which is probably better than getting stuck.
see issue #193