aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/references.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-10-24 08:37:52 +0100
committerGitHub <[email protected]>2019-10-24 08:37:52 +0100
commit018b621f613e87af26d8f7880ea1012cb374216c (patch)
treec2f9015026a295d17b792e917c1b42b09f933a57 /crates/ra_ide_api/src/references.rs
parent778f50b1477ad3c33cd6220f71bac7b83a66176a (diff)
parentac1b7b07e770652bad72f024efebfd5790a509c3 (diff)
Merge #2057
2057: add some profiling calls r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/references.rs')
-rw-r--r--crates/ra_ide_api/src/references.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs
index f35d835ac..8200bd1ef 100644
--- a/crates/ra_ide_api/src/references.rs
+++ b/crates/ra_ide_api/src/references.rs
@@ -16,6 +16,7 @@ mod search_scope;
16 16
17use once_cell::unsync::Lazy; 17use once_cell::unsync::Lazy;
18use ra_db::{SourceDatabase, SourceDatabaseExt}; 18use ra_db::{SourceDatabase, SourceDatabaseExt};
19use ra_prof::profile;
19use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SourceFile, SyntaxNode, TextUnit}; 20use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SourceFile, SyntaxNode, TextUnit};
20 21
21use crate::{db::RootDatabase, FilePosition, FileRange, NavigationTarget, RangeInfo}; 22use crate::{db::RootDatabase, FilePosition, FileRange, NavigationTarget, RangeInfo};
@@ -107,6 +108,8 @@ fn find_name<'a>(
107} 108}
108 109
109fn process_definition(db: &RootDatabase, def: NameDefinition, name: String) -> Vec<FileRange> { 110fn process_definition(db: &RootDatabase, def: NameDefinition, name: String) -> Vec<FileRange> {
111 let _p = profile("process_definition");
112
110 let pat = name.as_str(); 113 let pat = name.as_str();
111 let scope = def.search_scope(db); 114 let scope = def.search_scope(db);
112 let mut refs = vec![]; 115 let mut refs = vec![];