Skip to main content

benchmark — Compare configurations

Runs the analysis pipeline on a single GPX file across many different configuration combinations and produces a comparison table. This is useful for understanding the impact of each parameter on a given trace.

gpx-analyzer benchmark <file.gpx> [flags]

Modes

ModeDescriptionTypical run count
Reduced (default)Varies one axis at a time, others at defaults~22
--fullFull Cartesian product of all axes~1248
--vary axesVaries only the specified axesDepends on axes

Configuration axes

AxisValuesDescription
presethiking, trail, cyclingStop detection preset + GPS outlier threshold
elev-algothreshold, douglas-peucker, segmentsElevation gain algorithm
elev-smoothingnone, light, medium, heavyElevation smoothing level
track-smoothingnone, light, medium, heavyGPS lat/lon smoothing
demtrue, falseDEM correction on/off
elev-paramsAlgorithm-specific thresholdsThreshold: 1/2/3/5 m, DP epsilon: 1.5/3/5 m, Segments: min-length × max-deviation

In reduced mode, each axis is varied independently while all others remain at their default values (hiking, threshold, medium elevation smoothing, no track smoothing, DEM on, threshold=2.0).

Flags

FlagDescriptionDefault
-o, --outputExport results as CSV to this file path(disabled)
--fullRun all combinations (Cartesian product)false
--varyComma-separated axes to vary (e.g., preset,elev-algo)(all, reduced)
-v, --verbosePrint progress to stderrfalse
--sortSort results by column: distance, distance-3d, elev-gain, elev-loss, moving-time, avg-speed, max-speed, stops, filtered, time(input order)
--max-hrMaximum heart rate (bpm) for HR zone calculation0 (disabled)
--dem-dirDirectory of SRTM .hgt tiles(disabled)
--dem-auto-downloadAuto-download missing SRTM tilestrue
--dem-cacheCache directory for downloaded tiles(OS cache dir)
--dem-max-memoryMaximum memory (MB) for loaded DEM tiles0
--dem-skip-validationSkip post-download tile validationfalse

Output

The benchmark produces a table with the following metrics per configuration:

MetricDescription
Dist 2D / 3DTotal distance in km
D+ / D-Elevation gain / loss in meters
Max Ele / Min EleExtreme altitudes
Moving / StoppedTime durations
StopsNumber of detected stops
Avg Spd / Max SpdSpeeds in km/h
FilteredNumber of GPS outlier points removed
TimeComputation time per run

The table is printed to stdout as a formatted text table. Use -o to additionally export as CSV (importable in Excel or Google Sheets).

Examples

Quick comparison (reduced matrix, ~22 runs):

gpx-analyzer benchmark my-hike.gpx

Export to CSV with progress:

gpx-analyzer benchmark my-hike.gpx -o results.csv -v

Full Cartesian product (~1248 runs):

gpx-analyzer benchmark my-hike.gpx --full -o full_results.csv -v

Compare only presets and elevation algorithms:

gpx-analyzer benchmark my-hike.gpx --vary preset,elev-algo

Compare only smoothing levels:

gpx-analyzer benchmark my-hike.gpx --vary elev-smoothing,track-smoothing

Sort results by elevation gain:

gpx-analyzer benchmark my-hike.gpx --sort elev-gain

Benchmark without DEM (GPS elevation only):

gpx-analyzer benchmark my-hike.gpx --dem-auto-download=false