aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-22 09:31:07 +0100
committerAleksey Kladov <[email protected]>2019-05-22 09:31:07 +0100
commitf15bb3c98a76dd801d49ccf19958edaa74048b63 (patch)
treef0980fb5386ace6e2008e8844878070662c8d5e9 /crates/ra_hir/src
parent67d5927b160aa5ec66fb6dae5d7075ebb509066f (diff)
add profile calls to parsing/expansion routines
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/ids.rs2
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
6use ra_db::{FileId, salsa}; 6use ra_db::{FileId, salsa};
7use ra_syntax::{TreeArc, AstNode, ast, SyntaxNode}; 7use ra_syntax::{TreeArc, AstNode, ast, SyntaxNode};
8use ra_prof::profile;
8use mbe::MacroRules; 9use mbe::MacroRules;
9 10
10use crate::{ 11use 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) => {