 290d6363b8
			
		
	
	
		290d6363b8
		
	
	
	
	
		
			
			# 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 <35755164+l1npengtul@users.noreply.github.com> Co-authored-by: IceSentry <c.giguere42@gmail.com>
		
			
				
	
	
		
			28 lines
		
	
	
		
			965 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			965 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| mod diagnostic;
 | |
| mod entity_count_diagnostics_plugin;
 | |
| mod frame_time_diagnostics_plugin;
 | |
| mod log_diagnostics_plugin;
 | |
| mod system_information_diagnostics_plugin;
 | |
| 
 | |
| use bevy_app::prelude::*;
 | |
| pub use diagnostic::*;
 | |
| pub use entity_count_diagnostics_plugin::EntityCountDiagnosticsPlugin;
 | |
| pub use frame_time_diagnostics_plugin::FrameTimeDiagnosticsPlugin;
 | |
| pub use log_diagnostics_plugin::LogDiagnosticsPlugin;
 | |
| pub use system_information_diagnostics_plugin::SystemInformationDiagnosticsPlugin;
 | |
| 
 | |
| /// Adds core diagnostics resources to an App.
 | |
| #[derive(Default)]
 | |
| pub struct DiagnosticsPlugin;
 | |
| 
 | |
| impl Plugin for DiagnosticsPlugin {
 | |
|     fn build(&self, app: &mut App) {
 | |
|         app.init_resource::<Diagnostics>()
 | |
|             .add_startup_system(system_information_diagnostics_plugin::internal::log_system_info);
 | |
|     }
 | |
| }
 | |
| 
 | |
| /// The width which diagnostic names will be printed as
 | |
| /// Plugin names should not be longer than this value
 | |
| pub const MAX_DIAGNOSTIC_NAME_WIDTH: usize = 32;
 |