print memory usage for queries

This commit is contained in:
Aleksey Kladov 2019-06-30 14:40:01 +03:00
parent 2ad8220f58
commit d70520eb38
7 changed files with 101 additions and 13 deletions

View file

@ -270,6 +270,10 @@ impl AnalysisHost {
pub fn collect_garbage(&mut self) {
self.db.collect_garbage();
}
/// NB: this clears the database
pub fn per_query_memory_usage(&mut self) -> Vec<(String, ra_prof::Bytes)> {
self.db.per_query_memory_usage()
}
pub fn raw_database(&self) -> &(impl hir::db::HirDatabase + salsa::Database) {
&self.db
}