mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
print memory usage for queries
This commit is contained in:
parent
2ad8220f58
commit
d70520eb38
7 changed files with 101 additions and 13 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue