-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - add system information plugin and update relevant examples #5911
Conversation
NOTE: possibly blocked by #5454 |
It's not blocked on the log PR since this does something separate. The general case config doesn't work on windows though. I simply used the default config for the general case. I think cargo is smart enough to pick the most applicable config. |
There's also still the potential issue that the sysinfo crate doesn't work when used with bevy_dynamic. I can't reproduce it myself though. |
@@ -17,5 +17,7 @@ fn main() { | |||
// .add_plugin(bevy::diagnostic::EntityCountDiagnosticsPlugin::default()) | |||
// Uncomment this to add an asset count diagnostics: | |||
// .add_plugin(bevy::asset::diagnostic::AssetCountDiagnosticsPlugin::<Texture>::default()) | |||
// Uncomment this to add an System Info diagnostics: |
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: an System Info
-> system info
.
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.
// Uncomment this to add an System Info diagnostics: | |
// Uncomment this to add system info diagnostics: |
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.
Ah, thanks for catching that.
Ill try on my machine. Worst case sceneario, we throw away sys info and use the raw-platform APIs ourselves. Or just disable the whole thing if using dynamic. |
I'd much prefer just disabling it when using dynamic or just have a separate feature flag for the crate. Based on the blog post of sysinfo, getting all of this isn't trivial and I don't think it's worth it to go through the trouble of reimplementing it ourselves. |
Adding |
With the advancement in dynamic linking on Windows, is this ready for investigation? |
Yep, I think we can take a proper look at this now :) |
I'll take another look at this once I am free |
My last comment was 2 days ago... I swore it was today... Anyway, I have confirmed it working on my computer and I do not know how to solve the failing CI check. I believe this is ready for a merge, if someone were to test this on Mac and Windows just to make sure... |
and wasm, android and iOS? |
crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs
Outdated
Show resolved
Hide resolved
…in.rs Co-authored-by: François <[email protected]>
Yep... forgot about those :p WASM is the exception, sysinfo doesn't support WASM. |
@l1npengtul I'd suggest updating the cargo.toml based on the one in #5454 after some testing it looks like we can use a simpler cargo.toml, but also, we can disable default-features. I disabled it because the only thing it does is enable multithreading, which causes a dependency conflict and we don't really need mutlithreading for this anyway. Also, did you test it with dynamic linking enabled? If so, please leave a comment on the other PR. It will help both of these to get merged faster if we can confirm that it works. |
I think I did, I'll do it again to make sure. |
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.
crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs
Outdated
Show resolved
Hide resolved
I believe this is ready for merging. |
@l1npengtul I pushed a PR to your branch to remove the code duplication. I believe it's gonna be in a good state after that. I also tried adding the log_sysinfo to the module, but it doesn't really work since the intention was for that log to always be there so I kept them separate. |
Remove duplication
Thank you IceSentry! |
My previous PR broke something, so I made a new PR to your repo. I went back a bit to having 2 |
fix cfg sys usage
Green CI 🎉 |
bors try |
Thank you IceSentry!! |
bors r+ |
# Objective Solve #5464 ## Solution Adds a `SystemInformationDiagnosticsPlugin` to add diagnostics. Adds `Cargo.toml` flags to fix building on different platforms. --- ## Changelog Adds `sysinfo` crate to `bevy-diagnostics`. Changes in import order are due to clippy. Co-authored-by: l1npengtul <[email protected]> Co-authored-by: IceSentry <[email protected]>
Pull request successfully merged into main. Build succeeded! And happy new year! 🎉
|
…e#5911) # Objective Solve bevyengine#5464 ## Solution Adds a `SystemInformationDiagnosticsPlugin` to add diagnostics. Adds `Cargo.toml` flags to fix building on different platforms. --- ## Changelog Adds `sysinfo` crate to `bevy-diagnostics`. Changes in import order are due to clippy. Co-authored-by: l1npengtul <[email protected]> Co-authored-by: IceSentry <[email protected]>
# Problemo Some code in #5911 and #5454 does not compile with dynamic linking enabled. The code is behind a feature gate to prevent dynamically linked builds from breaking, but it's not quite set up correctly. ## Solution Forward the `dynamic` feature flag to the `bevy_diagnostic` crate and gate the code behind it. Co-authored-by: devil-ira <[email protected]>
…e#5911) # Objective Solve bevyengine#5464 ## Solution Adds a `SystemInformationDiagnosticsPlugin` to add diagnostics. Adds `Cargo.toml` flags to fix building on different platforms. --- ## Changelog Adds `sysinfo` crate to `bevy-diagnostics`. Changes in import order are due to clippy. Co-authored-by: l1npengtul <[email protected]> Co-authored-by: IceSentry <[email protected]>
# Problemo Some code in bevyengine#5911 and bevyengine#5454 does not compile with dynamic linking enabled. The code is behind a feature gate to prevent dynamically linked builds from breaking, but it's not quite set up correctly. ## Solution Forward the `dynamic` feature flag to the `bevy_diagnostic` crate and gate the code behind it. Co-authored-by: devil-ira <[email protected]>
Objective
Solve #5464
Solution
Adds a
SystemInformationDiagnosticsPlugin
to add diagnostics.Adds
Cargo.toml
flags to fix building on different platforms.Changelog
Adds
sysinfo
crate tobevy-diagnostics
.Changes in import order are due to clippy.