diff options
author | Aleksey Kladov <[email protected]> | 2019-05-22 09:31:07 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-05-22 09:31:07 +0100 |
commit | f15bb3c98a76dd801d49ccf19958edaa74048b63 (patch) | |
tree | f0980fb5386ace6e2008e8844878070662c8d5e9 /crates/ra_hir/src | |
parent | 67d5927b160aa5ec66fb6dae5d7075ebb509066f (diff) |
add profile calls to parsing/expansion routines
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/ids.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs index f901a7432..2eb7f0da0 100644 --- a/crates/ra_hir/src/ids.rs +++ b/crates/ra_hir/src/ids.rs | |||
@@ -5,6 +5,7 @@ use std::{ | |||
5 | 5 | ||
6 | use ra_db::{FileId, salsa}; | 6 | use ra_db::{FileId, salsa}; |
7 | use ra_syntax::{TreeArc, AstNode, ast, SyntaxNode}; | 7 | use ra_syntax::{TreeArc, AstNode, ast, SyntaxNode}; |
8 | use ra_prof::profile; | ||
8 | use mbe::MacroRules; | 9 | use mbe::MacroRules; |
9 | 10 | ||
10 | use crate::{ | 11 | use crate::{ |
@@ -60,6 +61,7 @@ impl HirFileId { | |||
60 | db: &impl DefDatabase, | 61 | db: &impl DefDatabase, |
61 | file_id: HirFileId, | 62 | file_id: HirFileId, |
62 | ) -> Option<TreeArc<SyntaxNode>> { | 63 | ) -> Option<TreeArc<SyntaxNode>> { |
64 | let _p = profile("parse_or_expand_query"); | ||
63 | match file_id.0 { | 65 | match file_id.0 { |
64 | HirFileIdRepr::File(file_id) => Some(db.parse(file_id).syntax().to_owned()), | 66 | HirFileIdRepr::File(file_id) => Some(db.parse(file_id).syntax().to_owned()), |
65 | HirFileIdRepr::Macro(macro_file) => { | 67 | HirFileIdRepr::Macro(macro_file) => { |