Skip to content

FrameSample

namespace Griff.Runtime;
public struct FrameSample

What one frame the screen showed cost, in milliseconds: the whole frame (from the last one shown to this one), and of it, the game’s steps, building the picture to draw (SceneRenderer) and drawing it. The rest of the frame is time the game had to spare, waiting for the screen. Allocated is the garbage the frame’s work made (the bytes it allocated, which the garbage collector will have to clear up), and Collections how many times the garbage collector ran during it.

public long Allocated { get; init; }
public float BuildMs { get; init; }
public int Collections { get; init; }
public float DrawMs { get; init; }
public int Draws { get; init; }
public float FrameMs { get; init; }
public float StepMs { get; init; }
public int Steps { get; init; }
public float WorkMs { get; }

The work the frame took: its steps, building and drawing.

public void Deconstruct(out float FrameMs, out float StepMs, out float BuildMs, out float DrawMs, out int Steps, out int Draws, out long Allocated, out int Collections)
public override bool Equals(object obj)
public bool Equals(FrameSample other)
public override int GetHashCode()
public override string ToString()