Skip to content
EliteChart

SchedulerStats

Documentation


Documentation / @elitechart/core / SchedulerStats

Defined in: scheduler/frame-scheduler.ts:70

Rolling paint-time snapshot. Populated by FrameScheduler on every tick so embedders can surface performance overlays / dev HUDs.

  • lastMs is the most recent paint's wall-clock duration.
  • avgMs is a 30-sample rolling average (~0.5s at 60fps) — smooths out single-frame spikes so the reported number is stable.
  • peakMs is the max across the rolling window.
  • frameCount is monotonic total frames since construction.
  • lastDirtyMask is the last paint's dirty-layer bitmask so consumers can see which layers were costly.

Example

code
const stats: SchedulerStats = chart.getPerfStats();
if (stats.avgMs > 16) console.warn('paint over budget');

Properties

avgMs

code
readonly avgMs: number;

Defined in: scheduler/frame-scheduler.ts:72


frameCount

code
readonly frameCount: number;

Defined in: scheduler/frame-scheduler.ts:74


lastDirtyMask

code
readonly lastDirtyMask: number;

Defined in: scheduler/frame-scheduler.ts:75


lastMs

code
readonly lastMs: number;

Defined in: scheduler/frame-scheduler.ts:71


peakMs

code
readonly peakMs: number;

Defined in: scheduler/frame-scheduler.ts:73