PerfSample beta
Interface of @v12-engine/client
export interface PerfSampleWhat the stats window shows. Times are in milliseconds, averaged over the last second
Members
activeMeshes
activeMeshes: number;Copies in view the renderer draws
activeTriangles
activeTriangles: number;Triangles drawn in a frame
animations
animations: number;Animations the clips move: one for every bone or node a clip moves
budget
budget?: BudgetSample;What the work done in pieces took of the frame's budget, each work and all together (FrameBudget.sample)
clientTime
clientTime: number;The client following the simulation, in milliseconds a frame
clips
clips: number;Clips playing (animation groups), and what they move: one animation for every bone or node a clip moves
cpuTime
cpuTime: number;Of that, what the CPU spends: the game's own work and the renderer's
detail
detail?: DetailStats;How many things are drawn at which level of detail (WorldDetail.stats). None where nothing is drawn by levels
drawCalls
drawCalls: number;Draw calls made in a frame
drawing
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
entities: number;Entities the client holds, drawn or not
firstSeen
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
fps: number;Frames drawn per second over the last second
frameTime
frameTime: number;From the start of one frame to the start of the next: what 240 fps has 4.17 ms for
gpu
gpu: string;The graphics card's name as the browser reports it, or empty where it does not
gpuPasses
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
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
heapLimit?: number;The most JavaScript memory the browser allows, in megabytes; undefined outside Chromium
heapUsed
heapUsed?: number;JavaScript memory, in megabytes. Undefined outside Chromium
hitches
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
materials: number;Materials in the scene
meshes
meshes: number;Meshes in the scene
particles
particles: number;Particles alive
phases
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
renderer: string;Which renderer is in use, webgpu or webgl
scenery
scenery?: SceneryStats;How the scenery is drawn: merged by chunks, as copies, on its own (DoodadView.stats). None where there is none
sceneTime
sceneTime: number;The renderer's part of the frame after the game's phases, all of it (drawing by its parts)
simulationTime
simulationTime: number;Running the simulation, and the client following it
slowestFrame
slowestFrame: number;The longest frame of the last second, in milliseconds
slowFrames
slowFrames: number;The frames of the last second slower than 20 ms, and the slowest: what hitches, which an average hides
textures
textures: number;Textures the engine holds
vertices
vertices: number;Vertices in the scene
workerTick
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
workerTickMax?: number;The longest tick of the worker's simulation of late, in milliseconds; undefined when workerTick is