aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-07-12 16:04:48 +0100
committerAleksey Kladov <[email protected]>2019-07-12 16:04:48 +0100
commite40494c6c1cc17eeb8bc43e1d3ad0ce82c39f6d1 (patch)
treed9d2add66afab6b2a48febb3013b5de03b4c4fe8 /crates/ra_cli
parent46d7b08c5f0440fed43399ffe925e30bfe95e5dd (diff)
account for dependencies when showing memory usage
Diffstat (limited to 'crates/ra_cli')
-rw-r--r--crates/ra_cli/src/analysis_stats.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs
index b8ad6aebc..c2a2b66d5 100644
--- a/crates/ra_cli/src/analysis_stats.rs
+++ b/crates/ra_cli/src/analysis_stats.rs
@@ -115,9 +115,13 @@ pub fn run(verbose: bool, memory_usage: bool, path: &Path, only: Option<&str>) -
115 println!("Analysis: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage()); 115 println!("Analysis: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage());
116 116
117 if memory_usage { 117 if memory_usage {
118 drop(db);
118 for (name, bytes) in host.per_query_memory_usage() { 119 for (name, bytes) in host.per_query_memory_usage() {
119 println!("{:>8} {}", bytes, name) 120 println!("{:>8} {}", bytes, name)
120 } 121 }
122 let before = ra_prof::memory_usage();
123 drop(host);
124 println!("leftover: {}", before.allocated - ra_prof::memory_usage().allocated)
121 } 125 }
122 126
123 Ok(()) 127 Ok(())