This commit is contained in:
Alex Holliday committed 2026-01-21 10:16:17 -08:00
1 parent ef61a63da0
commit d242382abf
2 files changed
+1 -5

No files matched your search

-1
View File
@@ -1,6 +1,5 @@
import type { Check, GroupedCheck, NormalizedCheck, NormalizedUptimeCheck } from "@/types/index.js";
const calculatePercentile = (arr: Check[], percentile: number): number => {
const sorted = arr.slice().sort((a, b) => a.responseTime - b.responseTime);
const index = (percentile / 100) * (sorted.length - 1);