Skip to content

Commit 2018a42

Browse files
committed
improve measuring download time
1 parent 2aab646 commit 2018a42

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/download.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,14 @@ fn make_download_req(
287287
}
288288

289289
fn handle_download_result(start_time: Instant, written_bytes: usize) {
290+
// Measuring the time where download is done
291+
let end = Instant::now();
292+
290293
log::info!(
291294
"Download finished - Processed file size: {}",
292295
utils::convert_bytes_to_human_readable(written_bytes)
293296
);
294-
// Measuring the time where download is done
295-
let end = Instant::now();
296-
297+
297298
// calculate the total download time
298299
let total_duration = end - start_time;
299300

0 commit comments

Comments
 (0)