docs(docs): R4.6 J2 recette (procedure, results grid, kit script), export harness phases and dist override, export series script, ledger targets of the app PDF suites, CLAUDE.md export flow; export driver publishes its User Timing split

This commit is contained in:
bchanot committed 2026-10-19 01:41:57 +02:00
1 parent 9cb3cb75d4
commit cdcdda8e1c
12 files changed
+679 -39

No files matched your search

+24
View File
@@ -145,6 +145,29 @@ function rastersOf(probe) {
}
}
/**
* Where the export's time went, from the page clock: before the first raster (checks,
* branding), the raster phase (first `toBlob` start to the last `toBlob` end, layout and
* image writing interleaved), the tail (last raster to the PDF blob: the remaining
* pages, the attachment, the save or `finish()`), plus the Rust driver's own split when
* the build publishes it (`faunosteo:export` User Timing: core calls, rasteriser awaits).
*/
function phasesOf(probe) {
const starts = probe.png.map((p) => p.startedAt).filter((t) => t != null)
const ends = probe.png.map((p) => p.at).filter((t) => t != null)
const first = starts.length ? Math.min(...starts) : null
const last = ends.length ? Math.max(...ends) : null
return {
headMs: elapsed(probe.clickAt, first),
rasterPhaseMs: elapsed(first, last),
tailMs: elapsed(last, probe.pdfBlobAt),
rasterSumMs: sum(
probe.png.map((p) => (p.at != null && p.startedAt != null ? p.at - p.startedAt : 0)),
),
driver: probe.exportTiming,
}
}
const elapsed = (from, to) => (from === null || to === null ? null : to - from)
function peakOf(snapshot) {
@@ -173,6 +196,7 @@ async function afterDownload(session, tab, end) {
suggestedFilename: end.value.suggestedFilename(),
exportMs: elapsed(probe.clickAt, probe.pdfBlobAt),
rasters: rastersOf(probe),
phases: phasesOf(probe),
cspViolations: probe.csp,
...peak,
after,