Skip to content

PerfSample beta ​

Interface of @v12-engine/client

ts
export interface PerfSample

What the stats window shows. Times are in milliseconds, averaged over the last second

Members ​

activeMeshes ​

ts
activeMeshes: number;

Copies in view the renderer draws

activeTriangles ​

ts
activeTriangles: number;

Triangles drawn in a frame

animations ​

ts
animations: number;

Animations the clips move: one for every bone or node a clip moves

budget ​

ts
budget?: BudgetSample;

What the work done in pieces took of the frame's budget, each work and all together (FrameBudget.sample)

clientTime ​

ts
clientTime: number;

The client following the simulation, in milliseconds a frame

clips ​

ts
clips: number;

Clips playing (animation groups), and what they move: one animation for every bone or node a clip moves

cpuTime ​

ts
cpuTime: number;

Of that, what the CPU spends: the game's own work and the renderer's

detail ​

ts
detail?: DetailStats;

How many things are drawn at which level of detail (WorldDetail.stats). None where nothing is drawn by levels

drawCalls ​

ts
drawCalls: number;

Draw calls made in a frame

drawing ​

ts
drawing?: PhaseSample[];

What the renderer's frame takes on the processor after the game's phases, by part, a frame over the last second (FrameStats.cpu: the side views, culling the main view, the picture's passes, the cascades, the uniforms, the uploads, encoding and submitting the frame). They add up to sceneTime; none where the renderer does not time them

entities ​

ts
entities: number;

Entities the client holds, drawn or not

firstSeen ​

ts
firstSeen?: FirstSeenSample;

The first-seen report (FirstSeen): the latest frames over its budget, each with the shaders compiled and the models built in it, and how many were made so far, by a warm-up or as they were first drawn

fps ​

ts
fps: number;

Frames drawn per second over the last second

frameTime ​

ts
frameTime: number;

From the start of one frame to the start of the next: what 240 fps has 4.17 ms for

gpu ​

ts
gpu: string;

The graphics card's name as the browser reports it, or empty where it does not

gpuPasses ​

ts
gpuPasses?: {
        name: string;
        ms: number;
    }[];

How the GPU's time in a frame is spent, the longest part first: each run of passes the card had in hand at once, named for the longest pass in it (the view, a shadow map, a pass of the picture, a target of the scene's), and how long the run took. A card that works on several passes at once (Apple's) takes the view and the picture's passes together: one run, main. These add up to gpuTime. Where the browser stamps passes (WebGPU), else none

gpuTime ​

ts
gpuTime?: number;

What the GPU takes for a frame: the time it had a pass of the frame in hand, from the first pass's start to the last pass's end less any gap between them (WebGPU, from the card's own stamps on every pass). Undefined where the browser does not tell

heapLimit ​

ts
heapLimit?: number;

The most JavaScript memory the browser allows, in megabytes; undefined outside Chromium

heapUsed ​

ts
heapUsed?: number;

JavaScript memory, in megabytes. Undefined outside Chromium

hitches ​

ts
hitches: Hitch[];

The latest frames over 33 ms (at most 20), each with the phase that took most of it: what an average hides

materials ​

ts
materials: number;

Materials in the scene

meshes ​

ts
meshes: number;

Meshes in the scene

particles ​

ts
particles: number;

Particles alive

phases ​

ts
phases: PhaseSample[];

Each phase of the frame by name, a frame, over the last second (CLIENT_PHASES; the editor's own), a phase followed by its parts (the world's fog, the overlay's plates and minimap, the scenery, the detail): the CPU's side of clientTime, named. Measured while enabled

renderer ​

ts
renderer: string;

Which renderer is in use, webgpu or webgl

scenery ​

ts
scenery?: SceneryStats;

How the scenery is drawn: merged by chunks, as copies, on its own (DoodadView.stats). None where there is none

sceneTime ​

ts
sceneTime: number;

The renderer's part of the frame after the game's phases, all of it (drawing by its parts)

simulationTime ​

ts
simulationTime: number;

Running the simulation, and the client following it

slowestFrame ​

ts
slowestFrame: number;

The longest frame of the last second, in milliseconds

slowFrames ​

ts
slowFrames: number;

The frames of the last second slower than 20 ms, and the slowest: what hitches, which an average hides

textures ​

ts
textures: number;

Textures the engine holds

vertices ​

ts
vertices: number;

Vertices in the scene

workerTick ​

ts
workerTick?: number;

A tick of a simulation run in a worker of this page (S54), evened out, and the longest of late: not part of the frame's time, as it is not on its thread. Undefined for a game played in the page's thread, or elsewhere

workerTickMax ​

ts
workerTickMax?: number;

The longest tick of the worker's simulation of late, in milliseconds; undefined when workerTick is