KernelAPI reference
Class FrameSummary
Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time
What a profiled run looked like. MotionError is the measure of uneven motion: for every frame, how far the game time it advanced differs from the wall time that passed, so a frame that repeats the previous picture or jumps two steps counts even when every frame took the same time.
public sealed record FrameSummary : IEquatable<FrameSummary>Inheritance
Implements
Constructors
FrameSummary(int, Percentiles, Percentiles, Percentiles, Percentiles, Percentiles, Percentiles, Percentiles, IReadOnlyList<int>, double, int, int)
What a profiled run looked like. MotionError is the measure of uneven motion: for every frame, how far the game time it advanced differs from the wall time that passed, so a frame that repeats the previous picture or jumps two steps counts even when every frame took the same time.
public FrameSummary(int Frames, Percentiles Interval, Percentiles Work, Percentiles Update, Percentiles Render, Percentiles Present, Percentiles MotionError, Percentiles InterpolatedMotionError, IReadOnlyList<int> StepsPerFrame, double AllocatedPerFrame, int Collections, int Hitches)Parameters
Frames int
Frames summarized.
Interval Percentiles
Time between frame starts.
Work Percentiles
Events, update and render: the CPU time of a frame before presenting.
Update Percentiles
Fixed steps.
Render Percentiles
Drawing.
Present Percentiles
Presenting (the VSync wait, when on).
MotionError Percentiles
|game time advanced − time the frame stood for| per frame, drawing the last step. The time a frame stood for is the whole number of refresh periods nearest to its interval when the display rate is known (DisplayRate), its measured interval otherwise.
InterpolatedMotionError Percentiles
The same for a game that draws with FrameBlend.
StepsPerFrame IReadOnlyList<int>
How many frames ran 0, 1, 2… steps (index = steps).
AllocatedPerFrame double
Mean bytes allocated per frame.
Collections int
Garbage collections during the frames.
Hitches int
Frames whose interval exceeded 1.5 times the median interval.
Properties
AllocatedPerFrame
Mean bytes allocated per frame.
public double AllocatedPerFrame { get; init; }Property Value
Collections
Garbage collections during the frames.
public int Collections { get; init; }Property Value
Frames
Frames summarized.
public int Frames { get; init; }Property Value
Hitches
Frames whose interval exceeded 1.5 times the median interval.
public int Hitches { get; init; }Property Value
InterpolatedMotionError
The same for a game that draws with FrameBlend.
public Percentiles InterpolatedMotionError { get; init; }Property Value
Interval
Time between frame starts.
public Percentiles Interval { get; init; }Property Value
MotionError
|game time advanced − time the frame stood for| per frame, drawing the last step. The time a frame stood for is the whole number of refresh periods nearest to its interval when the display rate is known (DisplayRate), its measured interval otherwise.
public Percentiles MotionError { get; init; }Property Value
Present
Presenting (the VSync wait, when on).
public Percentiles Present { get; init; }Property Value
Render
Drawing.
public Percentiles Render { get; init; }Property Value
StepsPerFrame
How many frames ran 0, 1, 2… steps (index = steps).
public IReadOnlyList<int> StepsPerFrame { get; init; }Property Value
Update
Fixed steps.
public Percentiles Update { get; init; }Property Value
Work
Events, update and render: the CPU time of a frame before presenting.
public Percentiles Work { get; init; }Property Value
Methods
<Clone>$()
public FrameSummary <Clone>$()Returns
Deconstruct(out int, out Percentiles, out Percentiles, out Percentiles, out Percentiles, out Percentiles, out Percentiles, out Percentiles, out IReadOnlyList<int>, out double, out int, out int)
public void Deconstruct(out int Frames, out Percentiles Interval, out Percentiles Work, out Percentiles Update, out Percentiles Render, out Percentiles Present, out Percentiles MotionError, out Percentiles InterpolatedMotionError, out IReadOnlyList<int> StepsPerFrame, out double AllocatedPerFrame, out int Collections, out int Hitches)Parameters
Frames int
Interval Percentiles
Work Percentiles
Update Percentiles
Render Percentiles
Present Percentiles
MotionError Percentiles
InterpolatedMotionError Percentiles
StepsPerFrame IReadOnlyList<int>
AllocatedPerFrame double
Collections int
Hitches int
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(FrameSummary?)
public bool Equals(FrameSummary? other)Parameters
other FrameSummary?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
A few lines for a console.
public override string ToString()Returns
Operators
operator ==(FrameSummary?, FrameSummary?)
public static bool operator ==(FrameSummary? left, FrameSummary? right)Parameters
left FrameSummary?
right FrameSummary?
Returns
operator !=(FrameSummary?, FrameSummary?)
public static bool operator !=(FrameSummary? left, FrameSummary? right)Parameters
left FrameSummary?
right FrameSummary?