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.
This commit is contained in:
Nicholas Nethercote 2015-02-09 18:47:23 -08:00
parent 91abf5557b
commit 121394a121

View file

@ -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());