benchmark library

The device benchmark harness for glass_forge.

Deliberately separate from package:glass_forge/glass_forge.dart -- nothing exported here is part of the rendering API ordinary consumers of the package use. Import this directly from a benchmark runner, such as benchmark/run_scene_benchmarks.dart.

See docs/superpowers/specs/2026-09-10-glass-forge-architecture-design.md §7: "The harness is not a deliverable that comes after -- tiers cannot be tuned without measurement, and performance claims made without it are guesses."

Classes

BenchmarkBudgets
The full set of committed per-scene budgets, keyed by scene id.
BenchmarkFrameReport
One scene's measured frame-time percentiles, with the honesty context a bare number cannot carry on its own.
BenchmarkGate
Compares a captured report against its committed budget.
BenchmarkGateResult
The verdict for one scene against its budget.
BenchmarkScene
A single, repeatable rendering scene used to isolate one performance variable.
BudgetViolation
One metric that exceeded its committed budget.
FrameTimeRecorder
Reduces a stream of engine frame timings to rolling build/raster/total percentiles.
FrameTimeStats
A percentile summary of a batch of frame-time samples.
SceneBudget
The frame-time ceilings one benchmark scene must stay under.

Enums

BenchmarkAxis
Which variable a BenchmarkScene isolates.
BenchmarkRunMode
Which Dart/Flutter compilation mode a benchmark ran under.

Properties

glassBenchmarkScenes → List<BenchmarkScene>
Every benchmark scene this package ships, grouped by axis.
no setter

Functions

warmUpGlassForgeShaders() → Future<void>
Waits for every core glass_forge shader to finish loading and compiling.