@pbroom/color-kit/planeTracing
PlaneQueryTraceSummary
Aggregate counters and metadata for one traced plane query. Present at every PlaneQueryTraceLevel.
import type { PlaneQueryTraceSummary } from '@pbroom/color-kit/plane';types.ts:114interface 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
- queryKind
PlaneQueryKind - Kind of the traced query.
- level
PlaneQueryTraceLevel - Trace level that was recorded.
- totalTimeMs
number - Wall-clock time for the whole query, in milliseconds. Non-deterministic.
- sampleCount
number - Scalar-field samples taken (cached repeats are not counted).
- scalarEvaluationCount
number - Scalar-field function evaluations; equals
sampleCountfor current solvers. - cellCount
number - Marching-squares cells visited, across all contouring passes.
- segmentCount
number - Contour segments emitted by marching squares before path assembly.
- pathCount
number - Paths produced by the solver.
- pointCount
number - Points across the solver's paths.
- resultPathCount
number - Paths in the returned result.
- resultPointCount
number - 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
computeandmarshalare filled, by@pbroom/color-kit/computebackends when a request asks for a trace; the other keys are reserved.
Also exported from
@pbroom/color-kitthe same declaration, re-exported