mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 03:11:01 +00:00
Docs: Update benchmark for google/gemini-3.1-flash-lite-preview
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
async function analyzeGPS(readings, boundary) {
|
||||
const { booleanPointInPolygon, lineString, length } = await import('https://cdn.skypack.dev/@turf/turf');
|
||||
|
||||
const valid = readings
|
||||
.filter(r => booleanPointInPolygon(r.loc, boundary))
|
||||
.sort((a, b) => a.ts - b.ts);
|
||||
|
||||
if (valid.length < 2) return 0;
|
||||
|
||||
const dist = length(lineString(valid.map(r => r.loc)), { units: 'kilometers' });
|
||||
|
||||
return +dist.toFixed(2);
|
||||
}
|
||||
export default analyzeGPS;
|
||||
// Generation time: 1.377s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user