mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
account for dependencies when showing memory usage
This commit is contained in:
parent
46d7b08c5f
commit
e40494c6c1
2 changed files with 11 additions and 0 deletions
|
@ -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(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue