MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / eta

Function eta

atomic-cli/src/commands/git/rolling_dashboard.rs:127–140  ·  view source on GitHub ↗
(progress: &Progress, elapsed: Duration)

Source from the content-addressed store, hash-verified

125}
126
127fn eta(progress: &Progress, elapsed: Duration) -> String {
128 if progress.phase == "complete" {
129 return "complete".into();
130 }
131 let remaining = progress.total.saturating_sub(progress.published);
132 let rate = rate(progress, elapsed);
133 if remaining == 0 {
134 "final proof separate".into()
135 } else if rate > 0.0 {
136 format!("~{:.0}s + final proof", remaining as f64 / rate)
137 } else {
138 "estimating...".into()
139 }
140}
141
142fn plain(progress: &Progress, sample: &Resources, cpu: Option<f64>, elapsed: Duration) -> String {
143 format!("Rolling import | {} | {:.1}s | staged {}/{} | {:.1} commits/s | ETA {}\nwindow {}/{} | checked {} | loaded {} | in flight {} | blob reservation {} / {}\nprocess RSS {} | peak {} | CPU {}\n",

Callers

nothing calls this directly

Calls 1

rateFunction · 0.85

Tested by

no test coverage detected