public sealed class FrameStatsOverlayThe frame-stats overlay: rate, the CPU/GPU split, what was drawn, and what memory is doing.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The one overlay worth leaving on, and therefore the one that has to be cheap enough to leave on. It allocates nothing per frame: every number is formatted into a stack buffer and the history behind the graph is a fixed array written round.
Frame time is graphed, not only printed. A mean of 16.7 ms and a mean of 16.7 ms with a 60 ms spike every second are the same number and completely different games, and the spike is the one somebody is complaining about. The graph is the last HistoryLength frames, unsmoothed, with the budget drawn across it.
Fields and properties (8)
public const int HistoryLengthHow many frames the graph remembers.
public string NameWhat the console and the toggles call it. Lower case, no spaces.
public OverlayAnchor AnchorWhich corner it is pinned to.
public bool EnabledWhether it is drawn.
public float WidthHow wide the panel is, in pixels.
public FrameStatistics StatisticsWhat the renderer reported. The host sets this once a frame.
public float SmoothedMillisecondsThe smoothed frame time, in milliseconds.
public float PeakMillisecondsThe worst frame in the graph's window, in milliseconds.
Methods (2)
public void Draw(OverlaySurface surface, in GameTime time)Draws it.
public void Reset()Forgets the graph's history and the running average.
Used by (2)
- ConsoleTestsVixen.Engine.Tests
- DiagnosticOverlayTestsVixen.Engine.Tests