ADFA-5228 feat(install): module-install ETA + 5%/95% progress band - #467
Open
luisguzman-adfa wants to merge 3 commits into
Open
ADFA-5228 feat(install): module-install ETA + 5%/95% progress band#467luisguzman-adfa wants to merge 3 commits into
luisguzman-adfa wants to merge 3 commits into
Conversation
… display shape) Foundation for the module-install ETA. Pure JVM, unit-tested; not wired yet. - RunroleTimings: measures each task's duration on this device (a task lasts from its header to the next; finish() closes the last), so the ETA learns per-device instead of trusting build-log times. - RunroleEta.secondsRemaining(): sums the learned durations of the remaining tasks; with no history it falls back to the rate observed this run. No warm-up (a runrole is not a download). - Eta.of(): the calm, rounded display shape (unknown / under a minute / N minutes); the words are left to the UI so the domain stays localization-free. Wiring (store + InstallService + UI slots) lands in the next commit on this PR.
…, show in slots) Feed the runrole's task stream to RunroleTimings, estimate seconds-remaining with RunroleEta (learned durations of the remaining tasks, else the run's observed rate), and publish it via ModuleQueueState.etaSeconds. On success the measured durations are blended into a per-role SharedPreferences store so the next ETA is sharper. The module and maps detail screens show "% | ~N min" in fixed slots (no reflow); the index keeps % only. ETA strings staged in strings_not_translated (translatable=false) until sign-off.
Instead of a flat 5% floor, the bar now creeps 1→5% as the runrole's warmup (common/dependency tasks before the module's own) advances, then jumps into the 5–95% band on the first known module task. Warmup progress is a task count toward a small heuristic target (build logs run every role, so they don't model a single module's short warmup). Pure change in RunroleProgress; tests updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice 3 of ADFA-5228. Builds on the determinate bar (2): the bar now lifts off
immediately and shows a learned ETA, so a proot install stops looking stuck.
dependency tasks before the module's own), fills 5–95% over the module's known
tasks, and reaches 100% only on completion — no more sitting dead at 0%.
across installs (build-log times aren't portable). ETA = the learned durations
of the remaining tasks; the first run falls back to the rate observed in that
run. No download-style warm-up. Shown next to the % in fixed slots so the line
doesn't reflow.
Percent stays the band; the ETA is additive. Pure logic (band, timings, estimate,
display shape) is unit-tested; durations persist per role in SharedPreferences.
Out of scope (follow-ups): per-task network/CPU tagging to soften the ETA on
downloads; a live download monitor for tasks like maps tiles; and applying the
same stable %+ETA slot layout to the rootfs installer.