Expand description
Bevy Performance HUD Plugin
A comprehensive performance monitoring overlay for Bevy applications that displays:
- Real-time performance graphs with configurable metrics
- System resource usage bars (CPU, memory)
- Custom metric tracking with extensible provider system
- Configurable visual appearance and positioning
Structs§
- BarConfig
- Configuration for a single performance bar.
- BarMaterial
- Material definition for rendering performance bars in the HUD.
- BarParams
- Parameters for the bar chart shader.
- BarScale
State - State for tracking dynamic bar scaling
- BarScale
States - Resource storing dynamic scaling states for all performance bars.
- Bars
Settings - Configuration for the performance bars display.
- Bevy
Perf HudPlugin - Main plugin for the Bevy Performance HUD.
- Curve
Config - Configuration for a single curve (line) in a performance graph.
- Curve
Defaults - Default values for curve configuration options.
- Entity
Count Metric Provider - Built-in metric provider for the total number of entities.
- FpsMetric
Provider - Built-in metric provider for frames per second (FPS).
- Frame
Time Metric Provider - Built-in metric provider for frame time in milliseconds.
- Graph
Border - Configuration for graph border appearance.
- Graph
Label Handle - Handle to a graph label entity, linking it to its metric.
- Graph
Scale State - Resource storing the current smoothed Y-axis scale for graphs.
- Graph
Settings - Configuration for the performance graph (chart) display.
- History
Buffers - Resource storing historical values for graph curve rendering.
- HudHandles
- Resource containing handles to all HUD-related entities and materials.
- Metric
Definition - Definition of a performance metric for display purposes.
- Metric
Providers - Resource managing the registry of all metric providers.
- Metric
Sample Context - Context passed to metric providers during sampling.
- Multi
Line Graph Material - Material definition for rendering multi-line graphs in the performance HUD.
- Multi
Line Graph Params - Parameters for the multi-line graph shader.
- Perf
HudSettings - Main configuration resource for the performance HUD.
- Process
CpuUsage Metric Provider - Built-in metric provider for process-specific CPU usage percentage.
- Process
MemUsage Metric Provider - Built-in metric provider for process-specific memory usage in bytes.
- Sampled
Values - Resource storing the most recent sampled values for all performance metrics.
- System
CpuUsage Metric Provider - Built-in metric provider for system-wide CPU usage percentage.
- System
MemUsage Metric Provider - Built-in metric provider for system-wide memory usage percentage.
Enums§
- BarScale
Mode - Bar scaling mode determines how the bar range is calculated.
Constants§
- MAX_
CURVES - Maximum number of curves that can be displayed simultaneously in a graph
- MAX_
SAMPLES - Maximum number of samples to store in the history buffer for graph rendering
- PROCESS_
CPU_ USAGE_ ID - Metric ID for process-specific CPU usage percentage
- PROCESS_
MEM_ USAGE_ ID - Metric ID for process-specific memory usage in bytes
- SAMPLES_
VEC4 - Number of Vec4 elements needed to pack all samples for shader
- SYSTEM_
CPU_ USAGE_ ID - Metric ID for system-wide CPU usage percentage
- SYSTEM_
MEM_ USAGE_ ID - Metric ID for system-wide memory usage percentage
Traits§
- Perf
HudApp Ext - Extension trait for
Appto easily register custom metric providers. - Perf
Metric Provider - Trait for implementing custom performance metric providers.
Functions§
- sample_
diagnostics - System that samples all registered metric providers and updates current values. The system only runs if PerfHudSettings is present and enabled.
- setup_
hud - Startup system that creates all HUD UI entities and materials. The system only runs if PerfHudSettings is present and enabled.
- sync_
hud_ visibility - System that synchronizes HUD visibility with the latest settings.
- update_
graph_ and_ bars - System that updates graph and bar displays with current performance data. The system only runs if both PerfHudSettings and HudHandles are present.