mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
- remove the unused Nominatim reserve(); spacing tests now measure the actual transport start across processes - start each queued building's 2 s ground-sampling budget when it reaches the head of the queue, and request a frame on promotion - accept Nominatim and grounds outlines that cross the antimeridian - let an unnamed school, university, hospital, cemetery, stadium or zoo area answer a grounds ask whose head noun names that kind, using only the part that holds the point; compare grounds names symmetrically - charge shared OpenFreeMap consumers their own slice and keep the charged budget at the previous 64 MiB - share one place-name fold, point-in-polygon, line stitching and nextTask helper instead of duplicates - exclude Who's On First sources licensed only as "CC BY (equivalent)" or "CC0 (equivalent)"; rebuild the pack from the pinned archives - whole-word neighbourhood alias guard; correct the outline size-limit comment - restore DATA_SOURCES.md table formatting, keeping only real edits - test behaviour instead of private engine fields
54 lines
1.3 KiB
JavaScript
54 lines
1.3 KiB
JavaScript
/** Optional development phase measurements; no provider payloads or credentials. */
|
|
export function phaseTiming(phase, start, detail = {}, scope = 'roads') {
|
|
if (import.meta.env?.DEV)
|
|
performance.measure(`${scope}:${phase}`, {
|
|
start,
|
|
end: performance.now(),
|
|
detail,
|
|
});
|
|
}
|
|
|
|
/** Bounded development evidence for one physical outline installation. */
|
|
export function createWorkTrace() {
|
|
if (!import.meta.env?.DEV) return null;
|
|
try {
|
|
return {
|
|
timeOrigin: performance.timeOrigin,
|
|
slices: [],
|
|
dropped: 0,
|
|
probes: 0,
|
|
samplerStart: null,
|
|
samplerHeadAt: null,
|
|
samplerStatus: null,
|
|
rendererStatus: null,
|
|
status: 'pending',
|
|
completedAt: null,
|
|
};
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/** Never let optional diagnostic recording change an installation outcome. */
|
|
export function recordWorkSlice(trace, phase, start, end, detail) {
|
|
if (!trace) return;
|
|
try {
|
|
if (trace.slices.length >= 16) {
|
|
trace.dropped += 1;
|
|
return;
|
|
}
|
|
trace.slices.push({
|
|
phase,
|
|
start,
|
|
end: end ?? performance.now(),
|
|
...(detail === undefined ? {} : { detail }),
|
|
});
|
|
} catch {
|
|
try {
|
|
trace.dropped += 1;
|
|
} catch {
|
|
// Missing or incomplete evidence fails the measurement, not the product.
|
|
}
|
|
}
|
|
}
|