diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-24 08:37:52 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-24 08:37:52 +0100 |
commit | 018b621f613e87af26d8f7880ea1012cb374216c (patch) | |
tree | c2f9015026a295d17b792e917c1b42b09f933a57 /crates/ra_ide_api/src/references.rs | |
parent | 778f50b1477ad3c33cd6220f71bac7b83a66176a (diff) | |
parent | ac1b7b07e770652bad72f024efebfd5790a509c3 (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.rs | 3 |
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 | ||
17 | use once_cell::unsync::Lazy; | 17 | use once_cell::unsync::Lazy; |
18 | use ra_db::{SourceDatabase, SourceDatabaseExt}; | 18 | use ra_db::{SourceDatabase, SourceDatabaseExt}; |
19 | use ra_prof::profile; | ||
19 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SourceFile, SyntaxNode, TextUnit}; | 20 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SourceFile, SyntaxNode, TextUnit}; |
20 | 21 | ||
21 | use crate::{db::RootDatabase, FilePosition, FileRange, NavigationTarget, RangeInfo}; | 22 | use crate::{db::RootDatabase, FilePosition, FileRange, NavigationTarget, RangeInfo}; |
@@ -107,6 +108,8 @@ fn find_name<'a>( | |||
107 | } | 108 | } |
108 | 109 | ||
109 | fn process_definition(db: &RootDatabase, def: NameDefinition, name: String) -> Vec<FileRange> { | 110 | fn 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![]; |