Skip to content

FrameCost

namespace Griff.Runtime;
public sealed class FrameCost

What one thing (a step of the frame, a kind of script, a system: see Kind) cost a frame, over the frames a FrameProfiler holds: the time it took on average and at worst, in milliseconds, the garbage it made a frame on average (in bytes), and its share of the frame’s work (its steps, building and drawing: 0 to 1).

public double Allocated { get; init; }
public string Garbage { get; }

The garbage it made a frame on average, e.g. “120 B”; empty when it made none.

public FrameCostKind Kind { get; init; }
public string Label { get; }

What it is, e.g. “Bunny (script): 1.25 ms”.

public double Ms { get; init; }
public string Name { get; init; }
public double Share { get; init; }
public double WorstMs { get; init; }
public static string Bytes(double bytes)

Bytes as people read them: “0 B”, “512 B”, “12.5 KB”, “1.2 MB”.

public void Deconstruct(out string Name, out FrameCostKind Kind, out double Ms, out double WorstMs, out double Allocated, out double Share)
public override bool Equals(object? obj)
public bool Equals(FrameCost? other)
public override int GetHashCode()
public override string ToString()