(progress: &Progress, sample: &Resources, cpu: Option<f64>, elapsed: Duration)
| 140 | } |
| 141 | |
| 142 | fn 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", |
| 144 | progress.phase, elapsed.as_secs_f64(), progress.published, progress.total, rate(progress, elapsed), eta(progress, elapsed), |
| 145 | progress.queued, progress.window_size, progress.checked, progress.loaded, progress.in_flight, |
| 146 | memory(Some(progress.reserved_bytes as u64)), memory(Some(progress.window_bytes as u64)), |
| 147 | memory(sample.rss), memory(sample.peak_rss), cpu_label(cpu)) |
| 148 | } |
| 149 | |
| 150 | fn ratio(value: usize, total: usize) -> f64 { |
| 151 | if total == 0 { |
no outgoing calls