KernelAPI reference
Struct FrameStatistics
Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time
What a frame cost, as LastFrame reports it. Times are in milliseconds of real time.
public readonly struct FrameStatistics : IEquatable<FrameStatistics>Implements
Constructors
FrameStatistics(long, double, double, double, double, double, int, long, int, int, int, GraphicsCounters, AudioStatistics)
What a frame cost, as LastFrame reports it. Times are in milliseconds of real time.
public FrameStatistics(long Frame, double Interval, double Events, double Update, double Render, double Present, int Steps, long Allocated, int Gen0Collections, int Gen1Collections, int Gen2Collections, GraphicsCounters Graphics, AudioStatistics Audio)Parameters
Frame long
The number of the frame, from 1; 0 when nothing was measured.
Interval double
Time since the previous measured frame started (0 for the first one).
Events double
The platform’s event pump.
Update double
The fixed steps and the per-frame updates (BeginFrame to LateUpdate).
Render double
Extracting and drawing (Extract and Render).
Present double
Presenting (Present and EndFrame), which includes waiting for the display.
Steps int
Fixed steps the frame ran.
Allocated long
Bytes the game’s thread allocated during the frame.
Gen0Collections int
Garbage collections of generation 0 during the frame.
Gen1Collections int
Garbage collections of generation 1 during the frame.
Gen2Collections int
Full garbage collections during the frame.
Graphics GraphicsCounters
The work the frame submitted to the graphics device (draw calls, passes, uploads; LiveResources is the count at its end). Zeros on a platform whose device does not count.
Audio AudioStatistics
The mixer’s voices at the end of the frame.
Properties
Allocated
Bytes the game’s thread allocated during the frame.
public long Allocated { get; init; }Property Value
Audio
The mixer’s voices at the end of the frame.
public AudioStatistics Audio { get; init; }Property Value
Collections
Garbage collections of any generation during the frame.
public int Collections { get; }Property Value
Events
The platform’s event pump.
public double Events { get; init; }Property Value
Frame
The number of the frame, from 1; 0 when nothing was measured.
public long Frame { get; init; }Property Value
Gen0Collections
Garbage collections of generation 0 during the frame.
public int Gen0Collections { get; init; }Property Value
Gen1Collections
Garbage collections of generation 1 during the frame.
public int Gen1Collections { get; init; }Property Value
Gen2Collections
Full garbage collections during the frame.
public int Gen2Collections { get; init; }Property Value
Graphics
The work the frame submitted to the graphics device (draw calls, passes, uploads; LiveResources is the count at its end). Zeros on a platform whose device does not count.
public GraphicsCounters Graphics { get; init; }Property Value
Interval
Time since the previous measured frame started (0 for the first one).
public double Interval { get; init; }Property Value
Present
Presenting (Present and EndFrame), which includes waiting for the display.
public double Present { get; init; }Property Value
Render
Extracting and drawing (Extract and Render).
public double Render { get; init; }Property Value
Steps
Fixed steps the frame ran.
public int Steps { get; init; }Property Value
Total
The frame’s work: events, update, render and present.
public double Total { get; }Property Value
Update
The fixed steps and the per-frame updates (BeginFrame to LateUpdate).
public double Update { get; init; }Property Value
Methods
Deconstruct(out long, out double, out double, out double, out double, out double, out int, out long, out int, out int, out int, out GraphicsCounters, out AudioStatistics)
public void Deconstruct(out long Frame, out double Interval, out double Events, out double Update, out double Render, out double Present, out int Steps, out long Allocated, out int Gen0Collections, out int Gen1Collections, out int Gen2Collections, out GraphicsCounters Graphics, out AudioStatistics Audio)Parameters
Frame long
Interval double
Events double
Update double
Render double
Present double
Steps int
Allocated long
Gen0Collections int
Gen1Collections int
Gen2Collections int
Graphics GraphicsCounters
Audio AudioStatistics
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(FrameStatistics)
public bool Equals(FrameStatistics other)Parameters
other FrameStatistics
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(FrameStatistics, FrameStatistics)
public static bool operator ==(FrameStatistics left, FrameStatistics right)Parameters
left FrameStatistics
right FrameStatistics
Returns
operator !=(FrameStatistics, FrameStatistics)
public static bool operator !=(FrameStatistics left, FrameStatistics right)Parameters
left FrameStatistics
right FrameStatistics