[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. 🫖 Status page with uptime monitoring & API monitoring as code 🫖 openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor

feat: show uptime percentages with 3 decimal places (#2559) master

* feat: show uptime percentages with 3 decimal places Support values like 99.xxx% so a single failed check can surface as 99.999 instead of collapsing to 99.99. * ci: apply automated fixes * fix: use floorPct for summary uptime, drop dead helpers, update markdown test * fix: correct floorPct truncating exact thousandths from float error Math.floor(ratio * 100_000) truncated a full thousandth when the caller's a/b division landed a few ULPs low — (29/100) * 100_000 is 28999.999999999996, so floorPct(0.29) returned 28.999. Affected 750 ratios for denominators up to 2000, including 29/100, 57/100 and 23/40. Add a 1e-8 epsilon before flooring: ~450x the ULP at this scale, and far below 0.5, so it cannot lift a genuinely-below value onto the next thousandth. The 'never round up to 100.000' invariant still holds. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Thibault Le Ouay Ducasse <thibaultleouay@gmail.com>


+48 -62
16 changed files