FrameCost
namespace Griff.Runtime;
public sealed class FrameCostWhat 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).
Properties
Section titled “Properties”Allocated
Section titled “Allocated”public double Allocated { get; init; }Garbage
Section titled “Garbage”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; }WorstMs
Section titled “WorstMs”public double WorstMs { get; init; }Methods
Section titled “Methods”public static string Bytes(double bytes)Bytes as people read them: “0 B”, “512 B”, “12.5 KB”, “1.2 MB”.
Deconstruct
Section titled “Deconstruct”public void Deconstruct(out string Name, out FrameCostKind Kind, out double Ms, out double WorstMs, out double Allocated, out double Share)Equals
Section titled “Equals”public override bool Equals(object? obj)Equals
Section titled “Equals”public bool Equals(FrameCost? other)GetHashCode
Section titled “GetHashCode”public override int GetHashCode()ToString
Section titled “ToString”public override string ToString()