Skip to content

Commit

Permalink
feat(restore): print timings in seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Mar 13, 2023
1 parent 4e9940d commit 608d3f5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/commands/restore.rs
Expand Up @@ -113,7 +113,7 @@ impl OroCommand for RestoreCmd {
}

if !self.quiet {
eprintln!("πŸŽ‰ Done in {}ms.", total_time.elapsed().as_micros() / 1000,);
eprintln!("πŸŽ‰ Done in {}s.", total_time.elapsed().as_millis() / 1000,);
}
Ok(())
}
Expand Down Expand Up @@ -142,9 +142,9 @@ impl RestoreCmd {
std::mem::drop(resolve_span);
if !self.quiet {
eprintln!(
"πŸ” Resolved {} packages in {}ms.",
"πŸ” Resolved {} packages in {}s.",
resolved_nm.package_count(),
resolve_time.elapsed().as_micros() / 1000
resolve_time.elapsed().as_millis() / 1000
);
}

Expand All @@ -171,8 +171,8 @@ impl RestoreCmd {
std::mem::drop(prune_span);
if !self.quiet {
eprintln!(
"🧹 Pruned {pruned} packages in {}ms.",
prune_time.elapsed().as_micros() / 1000
"🧹 Pruned {pruned} packages in {}s.",
prune_time.elapsed().as_millis() / 1000
);
}

Expand All @@ -199,9 +199,9 @@ impl RestoreCmd {
std::mem::drop(extract_span);
if !self.quiet {
eprintln!(
"πŸ“¦ Extracted {extracted} package{} in {}ms.",
"πŸ“¦ Extracted {extracted} package{} in {}s.",
if extracted == 1 { "" } else { "s" },
extract_time.elapsed().as_micros() / 1000
extract_time.elapsed().as_millis() / 1000
);
}

Expand Down

0 comments on commit 608d3f5

Please sign in to comment.