mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Some doc to bevy_diagnostic (#11020)
This commit is contained in:
parent
d99053cc8a
commit
05b00267c6
4 changed files with 20 additions and 2 deletions
|
@ -3,7 +3,11 @@ use bevy_ecs::entity::Entities;
|
||||||
|
|
||||||
use crate::{Diagnostic, DiagnosticId, Diagnostics, RegisterDiagnostic};
|
use crate::{Diagnostic, DiagnosticId, Diagnostics, RegisterDiagnostic};
|
||||||
|
|
||||||
/// Adds "entity count" diagnostic to an App
|
/// Adds "entity count" diagnostic to an App.
|
||||||
|
///
|
||||||
|
/// # See also
|
||||||
|
///
|
||||||
|
/// [`LogDiagnosticsPlugin`](crate::LogDiagnosticsPlugin) to output diagnostics to the console.
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct EntityCountDiagnosticsPlugin;
|
pub struct EntityCountDiagnosticsPlugin;
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,10 @@ use bevy_ecs::prelude::*;
|
||||||
use bevy_time::{Real, Time};
|
use bevy_time::{Real, Time};
|
||||||
|
|
||||||
/// Adds "frame time" diagnostic to an App, specifically "frame time", "fps" and "frame count"
|
/// Adds "frame time" diagnostic to an App, specifically "frame time", "fps" and "frame count"
|
||||||
|
///
|
||||||
|
/// # See also
|
||||||
|
///
|
||||||
|
/// [`LogDiagnosticsPlugin`](crate::LogDiagnosticsPlugin) to output diagnostics to the console.
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct FrameTimeDiagnosticsPlugin;
|
pub struct FrameTimeDiagnosticsPlugin;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,13 @@ use bevy_log::{debug, info};
|
||||||
use bevy_time::{Real, Time, Timer, TimerMode};
|
use bevy_time::{Real, Time, Timer, TimerMode};
|
||||||
use bevy_utils::Duration;
|
use bevy_utils::Duration;
|
||||||
|
|
||||||
/// An App Plugin that logs diagnostics to the console
|
/// An App Plugin that logs diagnostics to the console.
|
||||||
|
///
|
||||||
|
/// Diagnostics are collected by plugins such as
|
||||||
|
/// [`FrameTimeDiagnosticsPlugin`](crate::FrameTimeDiagnosticsPlugin)
|
||||||
|
/// or can be provided by the user.
|
||||||
|
///
|
||||||
|
/// When no diagnostics are provided, this plugin does nothing.
|
||||||
pub struct LogDiagnosticsPlugin {
|
pub struct LogDiagnosticsPlugin {
|
||||||
pub debug: bool,
|
pub debug: bool,
|
||||||
pub wait_duration: Duration,
|
pub wait_duration: Duration,
|
||||||
|
|
|
@ -10,6 +10,10 @@ use bevy_app::prelude::*;
|
||||||
/// * macos
|
/// * macos
|
||||||
///
|
///
|
||||||
/// NOT supported when using the `bevy/dynamic` feature even when using previously mentioned targets
|
/// NOT supported when using the `bevy/dynamic` feature even when using previously mentioned targets
|
||||||
|
///
|
||||||
|
/// # See also
|
||||||
|
///
|
||||||
|
/// [`LogDiagnosticsPlugin`](crate::LogDiagnosticsPlugin) to output diagnostics to the console.
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct SystemInformationDiagnosticsPlugin;
|
pub struct SystemInformationDiagnosticsPlugin;
|
||||||
impl Plugin for SystemInformationDiagnosticsPlugin {
|
impl Plugin for SystemInformationDiagnosticsPlugin {
|
||||||
|
|
Loading…
Reference in a new issue