about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2021-01-06 18:16:04 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2021-01-06 18:16:04 +0300
commitec9e2f50f46258fb03de0ffdebfe5d0c62c3f90e (patch)
tree3d14e3e4be0f87e4f90d7e041761a95ba7a001d0
parent655ac47ee3fc27de8281b4962831cf051b1e9118 (diff)
downloadrust-ec9e2f50f46258fb03de0ffdebfe5d0c62c3f90e.tar.gz
rust-ec9e2f50f46258fb03de0ffdebfe5d0c62c3f90e.zip
Less confusing instr stat
-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 5e276190e5c..cb6915d4583 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)?;