From 121394a121be5a2a8be491cc5c5b6ef13ca9f74d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 9 Feb 2015 18:47:23 -0800 Subject: [PATCH] Switch ordering of the memory profiler's output columns. Because _size_ is always small, but _category_ can be long, so it makes sense to have the _size_ on the left. --- components/util/memory.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/util/memory.rs b/components/util/memory.rs index 5249f3709aa..15d7902eff4 100644 --- a/components/util/memory.rs +++ b/components/util/memory.rs @@ -111,16 +111,16 @@ impl MemoryProfiler { match nbytes { Some(nbytes) => { let mebi = 1024f64 * 1024f64; - println!("{:24}: {:12.2}", path, (nbytes as f64) / mebi); + println!("{:12.2}: {}", (nbytes as f64) / mebi, path); } None => { - println!("{:24}: {:>12}", path, "???"); + println!("{:>12}: {}", "???", path); } } } fn handle_print_msg(&self) { - println!("{:24}: {:12}", "_category_", "_size (MiB)_"); + println!("{:12}: {}", "_size (MiB)_", "_category_"); // Virtual and physical memory usage, as reported by the OS. MemoryProfiler::print_measurement("vsize", get_vsize());