From ec9e2f50f46258fb03de0ffdebfe5d0c62c3f90e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 6 Jan 2021 18:16:04 +0300 Subject: Less confusing instr stat --- crates/profile/src/stop_watch.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/profile/src/stop_watch.rs b/crates/profile/src/stop_watch.rs index 5e276190e..cb6915d45 100644 --- a/crates/profile/src/stop_watch.rs +++ b/crates/profile/src/stop_watch.rs @@ -76,7 +76,11 @@ impl fmt::Display for StopWatchSpan { instructions /= 1000; prefix = "m" } - write!(f, ", {}{}i", instructions, prefix)?; + if instructions > 10000 { + instructions /= 1000; + prefix = "g" + } + write!(f, ", {}{}instr", instructions, prefix)?; } if let Some(memory) = self.memory { write!(f, ", {}", memory)?; -- cgit v1.2.3