Class RenderingMetrics
- Namespace
- SharpConsoleUI.Diagnostics
- Assembly
- SharpConsoleUI.dll
Captures per-frame performance and quality metrics for the rendering pipeline. Used to measure efficiency, detect performance issues, and validate optimizations.
public class RenderingMetrics
- Inheritance
-
RenderingMetrics
- Inherited Members
Properties
AnsiEscapeSequences
Gets or sets the total number of ANSI escape sequences in the output.
public int AnsiEscapeSequences { get; set; }
Property Value
AnsiGenerationTimeMs
Gets or sets the time spent generating ANSI sequences (milliseconds).
public double AnsiGenerationTimeMs { get; set; }
Property Value
AnsiOptimizationRatio
Gets or sets the ANSI optimization ratio (1.0 = fully optimized, 0.0 = no optimization).
public double AnsiOptimizationRatio { get; set; }
Property Value
BufferComparisonTimeMs
Gets or sets the time spent in buffer comparison (milliseconds).
public double BufferComparisonTimeMs { get; set; }
Property Value
BytesWritten
Gets or sets the total number of bytes written to console output. For static content, this should be zero after the first frame.
public int BytesWritten { get; set; }
Property Value
CellsActuallyRendered
Gets or sets the number of cells actually rendered to the console.
public int CellsActuallyRendered { get; set; }
Property Value
CellsDifferentFromPreviousFrame
Gets or sets the number of cells that differ from the previous frame.
public int CellsDifferentFromPreviousFrame { get; set; }
Property Value
CharactersChanged
Gets or sets the number of characters that changed in this frame.
public int CharactersChanged { get; set; }
Property Value
ColorChanges
Gets or sets the number of color changes in this frame.
public int ColorChanges { get; set; }
Property Value
ConsoleOutputTimeMs
Gets or sets the time spent writing to console (milliseconds).
public double ConsoleOutputTimeMs { get; set; }
Property Value
CursorMovements
Gets or sets the number of cursor movement commands.
public int CursorMovements { get; set; }
Property Value
DirtyCellsMarked
Gets or sets the number of cells marked as dirty in the CharacterBuffer.
public int DirtyCellsMarked { get; set; }
Property Value
DomLayoutTimeMs
Gets or sets the time spent in the DOM layout phase (milliseconds).
public double DomLayoutTimeMs { get; set; }
Property Value
EfficiencyRatio
Gets the efficiency ratio (actual rendered / dirty marked). A value close to 1.0 indicates efficient dirty tracking.
public double EfficiencyRatio { get; }
Property Value
FrameNumber
Gets or sets the frame number this metrics instance represents.
public int FrameNumber { get; set; }
Property Value
IsStaticFrame
Gets whether this frame had no changes from the previous frame. Static frames should produce zero console output.
public bool IsStaticFrame { get; }
Property Value
RedundantAnsiSequences
Gets or sets the number of redundant ANSI sequences detected (e.g., setting the same color twice).
public int RedundantAnsiSequences { get; set; }
Property Value
Timestamp
Gets or sets the timestamp when this frame was rendered.
public DateTime Timestamp { get; set; }
Property Value
TotalFrameTimeMs
Gets the total frame time across all phases.
public double TotalFrameTimeMs { get; }
Property Value
UnnecessaryResets
Gets or sets the number of unnecessary reset sequences.
public int UnnecessaryResets { get; set; }
Property Value
Methods
ToString()
Returns a summary string of the metrics.
public override string ToString()