Repository navigation
feat(gui): self-calibrating ETA, progress overhaul, --benchmark instrumentation - #1100
Conversation
…umentation GUI progress + ETA: - Add a phase-aware "time remaining" estimate, shown as a white pill on the progress bar. It only runs during generation (>=20%); within the current phase it extrapolates the real rate (least-squares over a sliding window), budgets remaining phases by per-regime time-weights calibrated to this run, and snaps to the real save rate. Smoothed, monotonic countdown via a 1s tick. - Additive `streaming` field on the progress-update payload (= eviction_active) via emit_gui_progress_update_ex, used only by the two terrain emits, so the ETA picks the right regime (the post-70% tail is ~instant under stream-to-disk but a real save otherwise). Graceful fallback when absent. Progress messages/percentages (now monotonic in real execution order): - Fetch Overture buildings right after the OSM download (dedup stays after parse). Download 1-5, Overture 6, surface types 9, elevation 10, elevation processing 12-18 (real progress), transform 19 (fixed), generating area 20-70, ground 70-90, save 90-100. - Friendlier, deduplicated messages: "Downloading map data", "Adding extra buildings", "Detecting surface types", "Generating area". - Drop the dead `stream_to_disk` locale key (removed low-memory-mode toggle). --benchmark instrumentation (gated; no output or cost without the flag): - Top-level per-phase marks + a per-step elevation breakdown. generation_time_ms and the peak-RSS marker are unchanged, so the PR benchmark CI is unaffected.
|
⏱️ Benchmark run finished in 0m 56s 📈 Compared against baseline: 18s time, 1005 MB memory 🟢 Generation time is unchanged. 📅 Last benchmark: 2026-06-14 21:11:36 UTC You can retrigger the benchmark by commenting |
There was a problem hiding this comment.
Pull request overview
This PR overhauls GUI progress reporting to be monotonic in real execution order, adds a phase-aware ETA overlay to the progress bar (with optional “streaming” regime hints from the backend), and introduces --benchmark phase instrumentation across terrain/elevation steps.
Changes:
- Re-map progress percentages/messages across download → Overture → land cover → elevation → parse/transform → generate → ground → save, and update emit sites accordingly.
- Add GUI-side self-calibrating ETA logic and a progress-bar overlay element/style; extend the progress payload with an optional
streamingfield viaemit_gui_progress_update_ex. - Add benchmark marks in CLI + terrain/elevation code paths (gated by
--benchmark).
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/retrieve_data.rs | Updates download-phase GUI messaging/progress emits. |
| src/progress.rs | Adds emit_gui_progress_update_ex to emit an additive streaming payload field. |
| src/overture.rs | Moves Overture progress emit to the new monotonic schedule. |
| src/osm_parser.rs | Adjusts/removes parsing progress emits to fit the new phase mapping. |
| src/map_transformation/transform_map.rs | Updates transform phase progress emit and removes per-op progress increments. |
| src/main.rs | Reorders Overture fetch earlier and adds top-level benchmark phase marks. |
| src/land_cover.rs | Aligns land-cover progress emit with the new percentage mapping/message. |
| src/ground.rs | Threads benchmark into terrain/elevation setup and marks land-cover fetch timing. |
| src/elevation/mod.rs | Adds benchmark marks for elevation sub-steps and remaps elevation progress emits. |
| src/data_processing.rs | Renames “Processing terrain” to “Generating area”, remaps progress band to 20–70, and emits streaming in the tile-parallel path. |
| src/gui/js/main.js | Implements the self-calibrating, phase-aware ETA estimator and wires it to progress events. |
| src/gui/index.html | Adds the ETA overlay element to the progress bar. |
| src/gui/css/styles.css | Styles/positions the ETA overlay and ensures the bar container is positioned for overlaying. |
| src/gui/locales/*.json | Removes the dead stream_to_disk localization key across multiple locales. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- emit_gui_progress_update_ex now forwards emit failures to GUI telemetry (send_log), matching emit_gui_progress_update. - Init last_emitted_pct to 20 (terrain starts at 20% now); the stale 25 value suppressed all per-tile progress and the first streaming payload until 26%, stalling the bar and delaying the ETA early in generation. - Land-cover Gaussian (the slowest elevation step on large areas) now reports sub-progress: gaussian_blur_grid runs its row/column passes in ~10 chunks and reports a fraction between them, mapped to 14->16% of "Processing elevation", so the bar animates instead of freezing. Blur output is unchanged (rows and columns stay independent; chunking only adds reporting points).
GUI progress + ETA:
streamingfield on the progress-update payload (= eviction_active) via emit_gui_progress_update_ex, used only by the two terrain emits, so the ETA picks the right regime (the post-70% tail is ~instant under stream-to-disk but a real save otherwise). Graceful fallback when absent.Progress messages/percentages (now monotonic in real execution order):
stream_to_disklocale key (removed low-memory-mode toggle).--benchmark instrumentation (gated; no output or cost without the flag):