Display upload speed in Web UI

This commit is contained in:
Igor Katson 2023-12-05 20:52:30 +00:00
parent 4784f3f14b
commit 80df2c1001
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
8 changed files with 89 additions and 55 deletions

View file

@ -377,7 +377,7 @@ async fn async_main(opts: Opts) -> anyhow::Result<()> {
None => continue
};
let stats = handle.stats_snapshot();
let speed = handle.speed_estimator();
let speed = handle.down_speed_estimator();
let total = stats.total_bytes;
let progress = stats.total_bytes - stats.remaining_bytes;
let downloaded_pct = if stats.remaining_bytes == 0 {
@ -390,7 +390,7 @@ async fn async_main(opts: Opts) -> anyhow::Result<()> {
idx,
downloaded_pct,
SF::new(progress),
speed.download_mbps(),
speed.mbps(),
SF::new(stats.fetched_bytes),
SF::new(stats.remaining_bytes),
SF::new(total),