mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 03:11:01 +00:00
Docs: Update benchmark for openrouter/hunter-alpha
This commit is contained in:
15
tests/11_geospatial/outputs/openrouter_hunter-alpha.js
Normal file
15
tests/11_geospatial/outputs/openrouter_hunter-alpha.js
Normal file
@@ -0,0 +1,15 @@
|
||||
```javascript
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const turf = await import('https://unpkg.com/@turf/turf@6/turf.min.js');
|
||||
const boundaryPolygon = turf.polygon(boundary.coordinates);
|
||||
const validReadings = readings.filter(r =>
|
||||
turf.booleanPointInPolygon(turf.point(r.loc), boundaryPolygon)
|
||||
);
|
||||
const sorted = validReadings.sort((a, b) => a.ts - b.ts);
|
||||
if (sorted.length < 2) return 0;
|
||||
const line = turf.lineString(sorted.map(r => r.loc));
|
||||
return Math.round(turf.length(line, {units: 'kilometers'}) * 100) / 100;
|
||||
};
|
||||
export default analyzeGPS;
|
||||
// Generation time: 56.302s
|
||||
// Result: FAIL
|
||||
Reference in New Issue
Block a user