aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-06-30 12:50:11 +0100
committerbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-06-30 12:50:11 +0100
commit79298b97228f09e0c5c51799700d8350f5468ed5 (patch)
tree74cde977e61652f9bd0af6c62449037ac100e94f /crates/ra_ide_api/src/lib.rs
parent2ad8220f58675193860337a00fed87162a98dc1a (diff)
parentd70520eb38c3f39823186c3b352efe4c910417f1 (diff)
Merge #1463
1463: print memory usage for queries r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r--crates/ra_ide_api/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs
index 28a74c003..817e65df0 100644
--- a/crates/ra_ide_api/src/lib.rs
+++ b/crates/ra_ide_api/src/lib.rs
@@ -270,6 +270,10 @@ impl AnalysisHost {
270 pub fn collect_garbage(&mut self) { 270 pub fn collect_garbage(&mut self) {
271 self.db.collect_garbage(); 271 self.db.collect_garbage();
272 } 272 }
273 /// NB: this clears the database
274 pub fn per_query_memory_usage(&mut self) -> Vec<(String, ra_prof::Bytes)> {
275 self.db.per_query_memory_usage()
276 }
273 pub fn raw_database(&self) -> &(impl hir::db::HirDatabase + salsa::Database) { 277 pub fn raw_database(&self) -> &(impl hir::db::HirDatabase + salsa::Database) {
274 &self.db 278 &self.db
275 } 279 }