mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-07-18 05:45:46 +00:00
Docs: Update benchmark for moonshotai/kimi-k3 EFF:medium
This commit is contained in:
13
tests/11_geospatial/outputs/moonshotai_kimi-k3 EFF_medium.js
Normal file
13
tests/11_geospatial/outputs/moonshotai_kimi-k3 EFF_medium.js
Normal file
@@ -0,0 +1,13 @@
|
||||
async function analyzeGPS(readings, boundary) {
|
||||
if (!Array.isArray(readings) || readings.length < 2) return 0;
|
||||
const m = await import('https://cdn.jsdelivr.net/npm/@turf/turf@7/+esm');
|
||||
const { booleanPointInPolygon: inside, lineString, length } = m.default ?? m;
|
||||
const coords = readings
|
||||
.filter(({ loc }) => loc && inside(loc, boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(({ loc }) => loc);
|
||||
return coords.length < 2 ? 0 : +length(lineString(coords), { units: 'kilometers' }).toFixed(2);
|
||||
}
|
||||
export default analyzeGPS;
|
||||
// Generation time: 75.533s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user