@pbroom/color-kit/planeTracing

PlaneQueryTraceSummary

Aggregate counters and metadata for one traced plane query. Present at every PlaneQueryTraceLevel.

interfaceimport type { PlaneQueryTraceSummary } from '@pbroom/color-kit/plane';types.ts:114
interface PlaneQueryTraceSummary {
  queryKind: PlaneQueryKind;
  level: PlaneQueryTraceLevel;
  totalTimeMs: number;
  sampleCount: number;
  scalarEvaluationCount: number;
  cellCount: number;
  segmentCount: number;
  pathCount: number;
  pointCount: number;
  resultPathCount: number;
  resultPointCount: number;
  solver?: PlaneGamutSolver | 'contrast-rays';
  samplingMode?: 'uniform' | 'adaptive' | 'analytic';
  viewportRelation?: PlaneViewportRelation;
  backend?: 'js';
  bucketKey?: string;
  scheduleReason?: 'default-js';
  droppedPieceCount?: number;
  fidelity?: { simplifyTolerance?: number; resolution?: number; steps?: number; maxDepth?: number; errorTolerance?: number };
  timings?: Partial<Record<'run' | 'sampling' | 'classification' | 'contouring' | 'paths' | 'simplify' | 'clipping' | 'visibleRegion' | 'refinement' | 'compute' | 'marshal', number>>;
}

Counters are work done by the solver; queries with closed-form results (gamutBoundary, chromaBand, fallbackPoint, gradient) leave them at 0 and only fill the result* counts.

Properties

queryKindPlaneQueryKind
Kind of the traced query.
levelPlaneQueryTraceLevel
Trace level that was recorded.
totalTimeMsnumber
Wall-clock time for the whole query, in milliseconds. Non-deterministic.
sampleCountnumber
Scalar-field samples taken (cached repeats are not counted).
scalarEvaluationCountnumber
Scalar-field function evaluations; equals sampleCount for current solvers.
cellCountnumber
Marching-squares cells visited, across all contouring passes.
segmentCountnumber
Contour segments emitted by marching squares before path assembly.
pathCountnumber
Paths produced by the solver.
pointCountnumber
Points across the solver's paths.
resultPathCountnumber
Paths in the returned result.
resultPointCountnumber
Points in the returned result.
solver?PlaneGamutSolver | 'contrast-rays'
Solver used by gamut-region and contrast queries.
samplingMode?'uniform' | 'adaptive' | 'analytic'
Sampling strategy: 'analytic' for closed-form gamut solvers, 'adaptive' for refined sampling, 'uniform' for a fixed grid.
viewportRelation?PlaneViewportRelation
Gamut-region queries: how the gamut relates to the viewport.
backend?'js'
Compute backend that ran the query (set by @pbroom/color-kit/compute).
bucketKey?string
Scheduler telemetry bucket the request was filed under (scheduled runs only).
scheduleReason?'default-js'
Why the scheduler picked the backend (scheduled runs only).
droppedPieceCount?number
Contrast queries: contour pieces the solver dropped because no end point passed the public checks (0 unless something is badly wrong).
fidelity?{ simplifyTolerance?: number; resolution?: number; steps?: number; maxDepth?: number; errorTolerance?: number }
Resolution settings the solver ran with; fields depend on the solver.
timings?Partial<Record<'run' | 'sampling' | 'classification' | 'contouring' | 'paths' | 'simplify' | 'clipping' | 'visibleRegion' | 'refinement' | 'compute' | 'marshal', number>>
Accumulated per-phase durations in milliseconds. Non-deterministic. Currently only compute and marshal are filled, by @pbroom/color-kit/compute backends when a request asks for a trace; the other keys are reserved.

Also exported from