@pbroom/color-kit/computeScheduling

getDefaultPlaneComputeTelemetrySnapshot

Returns a copy of the shared default scheduler's telemetry, recorded by runScheduledPlaneCompute calls that use the default scheduler.

functionimport { getDefaultPlaneComputeTelemetrySnapshot } from '@pbroom/color-kit/compute';index.ts:185
function getDefaultPlaneComputeTelemetrySnapshot(): PlaneComputeTelemetrySnapshot;

Each bucket groups runs of the same workload shape and counts them; timing fields (averageTotalMs, lastTotalMs) vary from run to run.

Returns

PlaneComputeTelemetrySnapshotBuckets, most recently used first.

Example

TypeScript
import {
  getDefaultPlaneComputeTelemetrySnapshot,
  resetDefaultPlaneComputeTelemetry,
  runScheduledPlaneCompute,
  type PlaneComputeRequest,
} from '@pbroom/color-kit/compute';

resetDefaultPlaneComputeTelemetry();
const request: PlaneComputeRequest = {
  plane: { model: 'oklch', fixed: { h: 250 } },
  queries: [{ kind: 'gamutRegion', gamut: 'srgb' }],
};
runScheduledPlaneCompute(request);
runScheduledPlaneCompute(request);
const { buckets } = getDefaultPlaneComputeTelemetrySnapshot();

buckets.length; // → 1
buckets[0].totalSamples; // → 2
buckets[0].backends.js?.sampleCount; // → 2

See also