Feature Library

On-page frame meter

0.31 GPU · 0.35 CPU ms
A still of the On-page frame meter demo
Still
The live demo starts when it’s in view.Fill the field · add rings · spread the glow · open Details

Labelled pass costs against a 16.7 ms frame budget, with separate CPU and GPU views, focusable details and a compact corner mode.

Three.js inspector timestamps and raw WebGPU pass wrappers keep asynchronous GPU results paired with their CPU frame; missing queries stay unavailable.

What it costs a frame

0.31 ms
0.35 ms
GPU
0.31 ms
CPU, median
0.35 ms
CPU, 95th pct
0.49 ms
Draw calls
63
Weight
Light

Measured 19 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 0.30–0.31, CPU 0.35–0.37 ms). What ran: The meter itself, with the picture it times kept as light as the controls allow: 60 field meshes, no surface rings, one blur step and the final composite, at a fixed 1024×768 work resolution. The meter paints at 4 Hz. The in-use view measures the default picture (300 meshes, two rings, eight blur steps), which is the demo’s deliberate workload, not the meter’s cost. Phones: tiers are being measured next.

How steadily it runs on RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference

Typical frame ?
4.13 ms
1% low ?
127 fps
Varies by ?
±0.93 ms
All metricsRTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference
p50p95p990.17 ms7.84 ms +
How long each frame took. Most frames sit in the tall bars; a long tail to the right is hitching.

Frames run back to back, each starting once the GPU has finished the last, so frame times show the work itself. They have a floor of about 4–5 ms from the browser’s own scheduling: GPU and CPU ms stay the measure of cost.

Frames

Median (p50) ?
4.13 ms
p95 ?
6.05 ms
p99 ?
7.66 ms
Slowest ?
8.17 ms
Mean ?
4.43 ms
Standard deviation ?
0.93 ms
1% low ?
127 fps
0.1% low ?
122 fps
Hitches ?
0 of 600
Over budget ?
0 of 600

Main thread

Long tasks ?
0
Long frames ?
0
Event-loop delay ?
0.0 / 0.6 / 0.7 ms

Input

No input during this run.

Memory

JavaScript heap ?
168 → 172 MB
Growth ?
+3.58 MB

Browser

JavaScript a frame ?
0.01 ms
All tasks a frame ?
0.63 ms
Layout / style ?
0.00 / 0.00 ms
Main thread busy ?
14%

Garbage collection

Collections ?
1 (1 minor, 0 major)
Pauses ?
1.7 ms in all, longest 1.7

What it needs

Renders with
WebGPU or WebGLWebGPU where there is one, WebGL2 where there is not.
Your browser
Runs hereNo WebGPU needed
Depends on
three.js 0.187.0No other packages
With an agent
install("frame-meter")Your coding agent reads its pitfalls and installs it through the library’s MCP server. Set it up

What it’s for

  1. Seeing which rendering pass spends the frame budget
  2. An in-app performance overlay with CPU fallback
  3. Timing named three.js renders or raw WebGPU render and compute passes

Pitfalls, in brief

  1. CPU and GPU overlap: never add them.
  2. Use unique names and disjoint synchronous scopes.
  3. Three.js integration is checked against r187.
  4. Raw WebGPU needs timestamp-query enabled when requesting the device.
  5. One readback is in flight at a time.
2 more in brief
  1. Dispose adapters and the meter on teardown.
  2. Live demo timing includes the workload and measurement overhead.
7 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

Written for the library. Adapted from published work, named below.

Hannes Andersson: Feature Library and grid-ui timestamp readback pattern.

performanceframe budgetCPUGPUtimestamp queriesprofilingpass timingaccessibilitythree.jswebgpuwebgl

Near it in the frame