MCPcopy Create free account
hub / github.com/KnockOutEZ/wigolo / p50

Function p50

tests/perf/embedding.bench.ts:23–26  ·  view source on GitHub ↗
(samples: number[])

Source from the content-addressed store, hash-verified

21const LONG = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. '.repeat(60);
22
23function p50(samples: number[]): number {
24 const sorted = [...samples].sort((a, b) => a - b);
25 return sorted[Math.floor(sorted.length * 0.5)];
26}
27
28async function time(fn: () => Promise<void>): Promise<number> {
29 const t0 = Date.now();

Callers 1

embedding.bench.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected