Include countme crate to count important data structures.

This commit is contained in:
Aleksey Kladov
2021-01-21 19:04:50 +03:00
parent 235583f3fc
commit e5c5c0a040
9 changed files with 58 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
//! errors.
use std::{
env,
path::PathBuf,
time::{SystemTime, UNIX_EPOCH},
};
@@ -295,6 +296,10 @@ impl AnalysisStatsCmd {
report_metric("total memory", memory.allocated.megabytes() as u64, "MB");
}
if env::var("RA_COUNT").is_ok() {
eprintln!("{}", profile::countme::get_all());
}
if self.memory_usage && verbosity.is_verbose() {
print_memory_usage(host, vfs);
}