diff options
author | Aleksey Kladov <[email protected]> | 2021-01-21 16:04:50 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-01-21 16:30:52 +0000 |
commit | e5c5c0a040e0c74892ea0a36c7fd50e5410879bd (patch) | |
tree | 4da6406b6d85f884b5ee2c927b2c1126192a9159 /crates/rust-analyzer/src/cli | |
parent | 235583f3fc886bb839f34c4ff5713d101939d95c (diff) |
Include `countme` crate to count important data structures.
Diffstat (limited to 'crates/rust-analyzer/src/cli')
-rw-r--r-- | crates/rust-analyzer/src/cli/analysis_stats.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/cli/analysis_stats.rs b/crates/rust-analyzer/src/cli/analysis_stats.rs index fd1407e60..66416f709 100644 --- a/crates/rust-analyzer/src/cli/analysis_stats.rs +++ b/crates/rust-analyzer/src/cli/analysis_stats.rs | |||
@@ -2,6 +2,7 @@ | |||
2 | //! errors. | 2 | //! errors. |
3 | 3 | ||
4 | use std::{ | 4 | use std::{ |
5 | env, | ||
5 | path::PathBuf, | 6 | path::PathBuf, |
6 | time::{SystemTime, UNIX_EPOCH}, | 7 | time::{SystemTime, UNIX_EPOCH}, |
7 | }; | 8 | }; |
@@ -295,6 +296,10 @@ impl AnalysisStatsCmd { | |||
295 | report_metric("total memory", memory.allocated.megabytes() as u64, "MB"); | 296 | report_metric("total memory", memory.allocated.megabytes() as u64, "MB"); |
296 | } | 297 | } |
297 | 298 | ||
299 | if env::var("RA_COUNT").is_ok() { | ||
300 | eprintln!("{}", profile::countme::get_all()); | ||
301 | } | ||
302 | |||
298 | if self.memory_usage && verbosity.is_verbose() { | 303 | if self.memory_usage && verbosity.is_verbose() { |
299 | print_memory_usage(host, vfs); | 304 | print_memory_usage(host, vfs); |
300 | } | 305 | } |