Skip to content

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.

C#
public sealed record FrameSummary : IEquatable<FrameSummary>

Inheritance

object ← FrameSummary

Implements

IEquatable<FrameSummary>

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.

C#
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.

C#
public double AllocatedPerFrame { get; init; }

Property Value

double

Collections

Garbage collections during the frames.

C#
public int Collections { get; init; }

Property Value

int

Frames

Frames summarized.

C#
public int Frames { get; init; }

Property Value

int

Hitches

Frames whose interval exceeded 1.5 times the median interval.

C#
public int Hitches { get; init; }

Property Value

int

InterpolatedMotionError

The same for a game that draws with FrameBlend.

C#
public Percentiles InterpolatedMotionError { get; init; }

Property Value

Percentiles

Interval

Time between frame starts.

C#
public Percentiles Interval { get; init; }

Property Value

Percentiles

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.

C#
public Percentiles MotionError { get; init; }

Property Value

Percentiles

Present

Presenting (the VSync wait, when on).

C#
public Percentiles Present { get; init; }

Property Value

Percentiles

Render

Drawing.

C#
public Percentiles Render { get; init; }

Property Value

Percentiles

StepsPerFrame

How many frames ran 0, 1, 2… steps (index = steps).

C#
public IReadOnlyList<int> StepsPerFrame { get; init; }

Property Value

IReadOnlyList<int>

Update

Fixed steps.

C#
public Percentiles Update { get; init; }

Property Value

Percentiles

Work

Events, update and render: the CPU time of a frame before presenting.

C#
public Percentiles Work { get; init; }

Property Value

Percentiles

Methods

<Clone>$()

C#
public FrameSummary <Clone>$()

Returns

FrameSummary

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)

C#
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?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(FrameSummary?)

C#
public bool Equals(FrameSummary? other)

Parameters

other FrameSummary?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

A few lines for a console.

C#
public override string ToString()

Returns

string

Operators

operator ==(FrameSummary?, FrameSummary?)

C#
public static bool operator ==(FrameSummary? left, FrameSummary? right)

Parameters

left FrameSummary?

right FrameSummary?

Returns

bool

operator !=(FrameSummary?, FrameSummary?)

C#
public static bool operator !=(FrameSummary? left, FrameSummary? right)

Parameters

left FrameSummary?

right FrameSummary?

Returns

bool