feat: Números measures the site and the Prumo (0.12)

The browser records page load, upload speed and bytes, Prumo's check and
the loose-art montage; the quote keeps them and Números shows average and
p95 per period. Print generation and the payment-to-card time come from
the database. The upload bar already estimates its remaining time.
This commit is contained in:
Cauê Faleiros
2026-11-06 11:09:36 -03:00
parent 945c9e366a
commit 6351a094f4
11 changed files with 170 additions and 3 deletions

View File

@@ -4,6 +4,12 @@
scope and run top to bottom, exactly as the original did. */
const $=id=>document.getElementById(id);
// What the browser measured while the customer built the cart (item 0.12):
// page load, upload, Prumo's check and the loose-art montage. It only feeds
// Números; no price or acceptance depends on it.
window.dtfTimings={pageStart:performance.now(),uploadStart:null,uploadEnd:null,
uploadBytes:0,uploadSeen:new Set(),analysisStart:null,analysisEnd:null,
montageStart:null,montageEnd:null};
const rs=v=>'R$ '+v.toFixed(2).replace('.',',');
// Ícones (Lucide, licença ISC) desenhados no próprio HTML: nada a carregar, e a
// cor vem do texto em volta. Os que ficam no HTML estático são os mesmos.