Class PerformanceElement
- Namespace
- SharpConsoleUI.Panel
- Assembly
- SharpConsoleUI.dll
A panel element that displays performance metrics (FPS and dirty characters). Uses a timer to invalidate periodically rather than every frame.
public class PerformanceElement : PanelElement, IPanelElement, IDisposable
- Inheritance
-
PerformanceElement
- Implements
- Inherited Members
- Extension Methods
Constructors
PerformanceElement(string?)
Initializes a new PerformanceElement.
public PerformanceElement(string? name = null)
Parameters
namestringOptional element name. Defaults to "performance".
Properties
FixedWidth
Gets the fixed width of this element, or null if it uses MeasureWidth() or flex sizing.
public override int? FixedWidth { get; }
Property Value
- int?
ShowDirtyChars
Gets or sets whether to show dirty character count.
public bool ShowDirtyChars { get; set; }
Property Value
ShowFPS
Gets or sets whether to show FPS metric.
public bool ShowFPS { get; set; }
Property Value
UpdateIntervalMs
Gets or sets the update interval in milliseconds.
public int UpdateIntervalMs { get; set; }
Property Value
Methods
Dispose()
Disposes the timer resource.
public void Dispose()
Render(CharacterBuffer, int, int, int, Color, Color)
Renders the element into the character buffer at the specified position.
public override void Render(CharacterBuffer buffer, int x, int y, int width, Color fg, Color bg)