From 2e3833dd30fafdc270e8d80a78af9116571dc247 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Thu, 27 Aug 2026 13:49:00 +0200 Subject: Use subcommand args instead of flags for CLI --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 123b021..deaa9fb 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ Climb profile by 100m step. ```bash mise run build mise run dev-watch # Start the web server on http://localhost:8080 -go run . -fetch-osm # Download the France OSM PBF (resumable) -go run . -extract-osm france-latest.osm.pbf # Extract mountain passes from a France OSM PBF -go run . -backfill # Recompute and persist all ride computed values -go run . -backtest # Benchmark computed vs stored ride values -go run . -pprof # Expose pprof endpoints at `/debug/pprof` +go run . fetch-osm # Download the France OSM PBF (resumable) +go run . extract-osm france-latest.osm.pbf # Extract mountain passes from a France OSM PBF +go run . backfill # Recompute and persist all ride computed values +go run . backtest # Benchmark computed vs stored ride values +go run . -- -pprof # Expose pprof endpoints at `/debug/pprof` docker compose up -d pyroscope # Start the local Pyroscope server on http://localhost:4040 ``` @@ -129,7 +129,8 @@ Answer "what slows the server" with function-level CPU profiles grouped by route ```bash # Start the server with pprof (exposes http://localhost:8080/debug/pprof/) -go run . -pprof +go run . -- -pprof +# or: go run . serve --pprof # or: mise run dev -- -pprof ``` @@ -158,7 +159,6 @@ go tool pprof -http=:8081 http://localhost:8080/debug/pprof/heap # allocs ## TODO -- cli args instea dof flags - screaming archi + hexagon - Compute estimated power, speed - For a ride, scatter, one point per 100m segment. Slope vs speed -- cgit v1.3