diff options
author | Jonas Schievink <[email protected]> | 2021-04-01 22:01:07 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-04-01 22:01:07 +0100 |
commit | 0a8274dd46e152ea9fae7053eba5dd4bc9329665 (patch) | |
tree | 2ae4a8aac20af124befaf10e30db7b7b00f90a25 /crates | |
parent | 25201b2dad7b4b0d41494e238ebf643ad7ad8cd6 (diff) |
Include remaining memory in memory usage stats
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/handlers.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs index 85e67554c..53d29ddfc 100644 --- a/crates/rust-analyzer/src/handlers.rs +++ b/crates/rust-analyzer/src/handlers.rs | |||
@@ -84,7 +84,8 @@ pub(crate) fn handle_analyzer_status( | |||
84 | 84 | ||
85 | pub(crate) fn handle_memory_usage(state: &mut GlobalState, _: ()) -> Result<String> { | 85 | pub(crate) fn handle_memory_usage(state: &mut GlobalState, _: ()) -> Result<String> { |
86 | let _p = profile::span("handle_memory_usage"); | 86 | let _p = profile::span("handle_memory_usage"); |
87 | let mem = state.analysis_host.per_query_memory_usage(); | 87 | let mut mem = state.analysis_host.per_query_memory_usage(); |
88 | mem.push(("Remaining".into(), profile::memory_usage().allocated)); | ||
88 | 89 | ||
89 | let mut out = String::new(); | 90 | let mut out = String::new(); |
90 | for (name, bytes) in mem { | 91 | for (name, bytes) in mem { |