(baseUrl: string, sid: string)
| 57 | } |
| 58 | |
| 59 | async function timeSnapshot(baseUrl: string, sid: string): Promise<number> { |
| 60 | const t = performance.now(); |
| 61 | const res = await fetch(`${baseUrl}/api/v1/sessions/${sid}/snapshot`, withAuth()); |
| 62 | await res.text(); |
| 63 | return performance.now() - t; |
| 64 | } |
| 65 | |
| 66 | function quantile(samples: readonly number[], q: number): number { |
| 67 | const sorted = [...samples].sort((a, b) => a - b); |
no test coverage detected