Skip to content

Commit 05b0026

Browse files
authored
Some doc to bevy_diagnostic (#11020)
1 parent d99053c commit 05b0026

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

crates/bevy_diagnostic/src/entity_count_diagnostics_plugin.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ use bevy_ecs::entity::Entities;
33

44
use crate::{Diagnostic, DiagnosticId, Diagnostics, RegisterDiagnostic};
55

6-
/// Adds "entity count" diagnostic to an App
6+
/// Adds "entity count" diagnostic to an App.
7+
///
8+
/// # See also
9+
///
10+
/// [`LogDiagnosticsPlugin`](crate::LogDiagnosticsPlugin) to output diagnostics to the console.
711
#[derive(Default)]
812
pub struct EntityCountDiagnosticsPlugin;
913

crates/bevy_diagnostic/src/frame_time_diagnostics_plugin.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ use bevy_ecs::prelude::*;
55
use bevy_time::{Real, Time};
66

77
/// Adds "frame time" diagnostic to an App, specifically "frame time", "fps" and "frame count"
8+
///
9+
/// # See also
10+
///
11+
/// [`LogDiagnosticsPlugin`](crate::LogDiagnosticsPlugin) to output diagnostics to the console.
812
#[derive(Default)]
913
pub struct FrameTimeDiagnosticsPlugin;
1014

crates/bevy_diagnostic/src/log_diagnostics_plugin.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ use bevy_log::{debug, info};
55
use bevy_time::{Real, Time, Timer, TimerMode};
66
use bevy_utils::Duration;
77

8-
/// An App Plugin that logs diagnostics to the console
8+
/// An App Plugin that logs diagnostics to the console.
9+
///
10+
/// Diagnostics are collected by plugins such as
11+
/// [`FrameTimeDiagnosticsPlugin`](crate::FrameTimeDiagnosticsPlugin)
12+
/// or can be provided by the user.
13+
///
14+
/// When no diagnostics are provided, this plugin does nothing.
915
pub struct LogDiagnosticsPlugin {
1016
pub debug: bool,
1117
pub wait_duration: Duration,

crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ use bevy_app::prelude::*;
1010
/// * macos
1111
///
1212
/// NOT supported when using the `bevy/dynamic` feature even when using previously mentioned targets
13+
///
14+
/// # See also
15+
///
16+
/// [`LogDiagnosticsPlugin`](crate::LogDiagnosticsPlugin) to output diagnostics to the console.
1317
#[derive(Default)]
1418
pub struct SystemInformationDiagnosticsPlugin;
1519
impl Plugin for SystemInformationDiagnosticsPlugin {

0 commit comments

Comments
 (0)