mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-04-07 12:52:12 +00:00
Docs: Update benchmark for minimax/minimax-m2.7
This commit is contained in:
14
tests/11_geospatial/outputs/minimax_minimax-m2.7.js
Normal file
14
tests/11_geospatial/outputs/minimax_minimax-m2.7.js
Normal file
@@ -0,0 +1,14 @@
|
||||
async function analyzeGPS(readings, boundary) {
|
||||
const mod = await import('https://cdn.jsdelivr.net/npm/@turf/turf/turf.mjs');
|
||||
const turf = mod.default || mod;
|
||||
const pts = readings.filter(r => {
|
||||
const p = turf.point(r.loc);
|
||||
return turf.booleanPointInPolygon(p, boundary) && !turf.booleanPointOnPolygon(p, boundary);
|
||||
});
|
||||
if (pts.length < 2) return 0;
|
||||
pts.sort((a, b) => a.ts - b.ts);
|
||||
return Math.round(turf.length(turf.lineString(pts.map(p => p.loc)), {units: 'kilometers'}) * 100) / 100;
|
||||
}
|
||||
export default analyzeGPS;
|
||||
// Generation time: 211.389s
|
||||
// Result: FAIL
|
||||
Reference in New Issue
Block a user