mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
Docs: Update benchmark for minimax/minimax-m2.1
This commit is contained in:
12
tests/11_geospatial/outputs/minimax_minimax-m2.1.js
Normal file
12
tests/11_geospatial/outputs/minimax_minimax-m2.1.js
Normal file
@@ -0,0 +1,12 @@
|
||||
async function analyzeGPS(readings, boundary) {
|
||||
if (!readings?.length) return 0;
|
||||
const turf = await import('https://cdn.skypack.dev/@turf/turf');
|
||||
const valid = readings.filter(r => turf.booleanPointInPolygon(r.loc, boundary));
|
||||
valid.sort((a, b) => a.ts - b.ts);
|
||||
if (valid.length < 2) return 0;
|
||||
const line = turf.lineString(valid.map(r => r.loc));
|
||||
return Math.round(turf.length(line, { units: 'kilometers' }) * 100) / 100;
|
||||
}
|
||||
export default analyzeGPS;
|
||||
// Generation time: 6.167s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user