From e40494c6c1cc17eeb8bc43e1d3ad0ce82c39f6d1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 12 Jul 2019 18:04:48 +0300 Subject: account for dependencies when showing memory usage --- crates/ra_cli/src/analysis_stats.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_cli') 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>) - println!("Analysis: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage()); if memory_usage { + drop(db); for (name, bytes) in host.per_query_memory_usage() { println!("{:>8} {}", bytes, name) } + let before = ra_prof::memory_usage(); + drop(host); + println!("leftover: {}", before.allocated - ra_prof::memory_usage().allocated) } Ok(()) -- cgit v1.2.3