aboutsummaryrefslogtreecommitdiff
path: root/crates/profile/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-06 15:16:56 +0000
committerGitHub <[email protected]>2021-01-06 15:16:56 +0000
commitd8dfcc2c0cf87162ec5791121f484dd7fde8d17d (patch)
tree3d14e3e4be0f87e4f90d7e041761a95ba7a001d0 /crates/profile/src
parent655ac47ee3fc27de8281b4962831cf051b1e9118 (diff)
parentec9e2f50f46258fb03de0ffdebfe5d0c62c3f90e (diff)
Merge #7179
7179: Less confusing instr stat r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/profile/src')
-rw-r--r--crates/profile/src/stop_watch.rs6
1 files changed, 5 insertions, 1 deletions
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 {
76 instructions /= 1000; 76 instructions /= 1000;
77 prefix = "m" 77 prefix = "m"
78 } 78 }
79 write!(f, ", {}{}i", instructions, prefix)?; 79 if instructions > 10000 {
80 instructions /= 1000;
81 prefix = "g"
82 }
83 write!(f, ", {}{}instr", instructions, prefix)?;
80 } 84 }
81 if let Some(memory) = self.memory { 85 if let Some(memory) = self.memory {
82 write!(f, ", {}", memory)?; 86 write!(f, ", {}", memory)?;