API Reference · Diagnostics

Diagnostics.FrameRecord

Namespace: Ava3D.Diagnostics

public readonly record struct Diagnostics.FrameRecord

One frame as the trace saw it: what was built for it, what it cost on each thread, and what the caches did while it was drawn.

Constructors

MemberDescription
Diagnostics.FrameRecord(long FrameId, double TimeMs, long SceneId, long SnapshotId, string RebuildReason, double PrepareMs, double SubmitMs, Nullable<double> GpuMs, double RepaintWaitMs, Nullable<double> PresentMs, int Uploads, long UploadBytes, int Evictions, int ProgramEvaluations, Diagnostics.PassTiming[] Passes, string Backend, int SampleCount, PixelSize InternalSize, Nullable<long> ResidentBytes, bool Reused)

One frame as the trace saw it: what was built for it, what it cost on each thread, and what the caches did while it was drawn.

FrameId

Counts every record — rendered or reused — from one for this trace.

TimeMs

When the render thread started on it, in milliseconds since the trace was made.

SceneId

Which Scene the snapshot came from; changes on a scene swap.

SnapshotId

Which snapshot was drawn. Unchanged across frames that rebuilt nothing.

RebuildReason

Why the snapshot was rebuilt — "Structure, Transform", say — on the first frame that draws it, with "Program" added on a frame drawn because a texture program evaluated. Null when nothing was rebuilt.

PrepareMs

UI-thread time spent building the snapshot this frame is the first to draw.

SubmitMs

Render-thread time from the start of the frame to the report being published.

GpuMs

What the card spent, where the backend can measure it; filled in a frame or two late.

RepaintWaitMs

How long the compositor took between the request for this frame and the render.

PresentMs

Always null. A guest renderer is handed a surface and never told when it reached the glass — nothing comes back from the compositor — so the time from submission to display is not measurable from here. See docs/pacing-and-present-health.md §3. The column exists so a host that can measure it has somewhere to put it.

Uploads

Textures and meshes uploaded during this frame.

UploadBytes

What those uploads weighed.

Evictions

Resources released because nothing drawn used them any more.

ProgramEvaluations

Texture programs evaluated on the UI thread since the previous record.

Passes

Shadow, contact, scene and bloom — GPU cost where the backend brackets them.

Backend

The renderer's name as it reports itself: "Metal", "OpenGL", "Vulkan", "Skia".

SampleCount

Samples per pixel the frame was rasterised with.

InternalSize

The render target, in device pixels.

ResidentBytes

What the device's caches held after the frame — decoded pixels, on the software renderer. Null before a renderer exists.

Reused

True for a repaint answered with the previous frame rather than a render.

Properties

MemberDescription
string Backend { get; set; }

The renderer's name as it reports itself: "Metal", "OpenGL", "Vulkan", "Skia".

int Evictions { get; set; }

Resources released because nothing drawn used them any more.

long FrameId { get; set; }

Counts every record — rendered or reused — from one for this trace.

Nullable<double> GpuMs { get; set; }

What the card spent, where the backend can measure it; filled in a frame or two late.

PixelSize InternalSize { get; set; }

The render target, in device pixels.

Diagnostics.PassTiming[] Passes { get; set; }

Shadow, contact, scene and bloom — GPU cost where the backend brackets them.

double PrepareMs { get; set; }

UI-thread time spent building the snapshot this frame is the first to draw.

Nullable<double> PresentMs { get; set; }

Always null. A guest renderer is handed a surface and never told when it reached the glass — nothing comes back from the compositor — so the time from submission to display is not measurable from here. See docs/pacing-and-present-health.md §3. The column exists so a host that can measure it has somewhere to put it.

int ProgramEvaluations { get; set; }

Texture programs evaluated on the UI thread since the previous record.

string RebuildReason { get; set; }

Why the snapshot was rebuilt — "Structure, Transform", say — on the first frame that draws it, with "Program" added on a frame drawn because a texture program evaluated. Null when nothing was rebuilt.

double RepaintWaitMs { get; set; }

How long the compositor took between the request for this frame and the render.

Nullable<long> ResidentBytes { get; set; }

What the device's caches held after the frame — decoded pixels, on the software renderer. Null before a renderer exists.

bool Reused { get; set; }

True for a repaint answered with the previous frame rather than a render.

int SampleCount { get; set; }

Samples per pixel the frame was rasterised with.

long SceneId { get; set; }

Which Scene the snapshot came from; changes on a scene swap.

long SnapshotId { get; set; }

Which snapshot was drawn. Unchanged across frames that rebuilt nothing.

double SubmitMs { get; set; }

Render-thread time from the start of the frame to the report being published.

double TimeMs { get; set; }

When the render thread started on it, in milliseconds since the trace was made.

long UploadBytes { get; set; }

What those uploads weighed.

int Uploads { get; set; }

Textures and meshes uploaded during this frame.

See also