aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-12 15:32:36 +0100
committerAleksey Kladov <[email protected]>2020-08-12 15:35:29 +0100
commit208b7bd7ba687fb570feb1b89219f14c63712ce8 (patch)
treec39749d1b71b73b4017c2d0d848ebdc85e570c39 /crates/ra_ide/src
parent98baa9b569b49162392ed4149dd435854fe941b8 (diff)
Rename ra_prof -> profile
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/diagnostics.rs3
-rw-r--r--crates/ra_ide/src/inlay_hints.rs3
-rw-r--r--crates/ra_ide/src/lib.rs2
-rw-r--r--crates/ra_ide/src/references.rs3
-rw-r--r--crates/ra_ide/src/status.rs2
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs3
6 files changed, 6 insertions, 10 deletions
diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs
index 1046d7ab3..07bf133bd 100644
--- a/crates/ra_ide/src/diagnostics.rs
+++ b/crates/ra_ide/src/diagnostics.rs
@@ -10,7 +10,6 @@ use hir::{diagnostics::DiagnosticSinkBuilder, Semantics};
10use itertools::Itertools; 10use itertools::Itertools;
11use ra_db::SourceDatabase; 11use ra_db::SourceDatabase;
12use ra_ide_db::RootDatabase; 12use ra_ide_db::RootDatabase;
13use ra_prof::profile;
14use ra_syntax::{ 13use ra_syntax::{
15 ast::{self, AstNode}, 14 ast::{self, AstNode},
16 SyntaxNode, TextRange, T, 15 SyntaxNode, TextRange, T,
@@ -33,7 +32,7 @@ pub(crate) fn diagnostics(
33 file_id: FileId, 32 file_id: FileId,
34 enable_experimental: bool, 33 enable_experimental: bool,
35) -> Vec<Diagnostic> { 34) -> Vec<Diagnostic> {
36 let _p = profile("diagnostics"); 35 let _p = profile::span("diagnostics");
37 let sema = Semantics::new(db); 36 let sema = Semantics::new(db);
38 let parse = db.parse(file_id); 37 let parse = db.parse(file_id);
39 let mut res = Vec::new(); 38 let mut res = Vec::new();
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs
index 1bacead63..920b04e8d 100644
--- a/crates/ra_ide/src/inlay_hints.rs
+++ b/crates/ra_ide/src/inlay_hints.rs
@@ -1,6 +1,5 @@
1use hir::{Adt, Callable, HirDisplay, Semantics, Type}; 1use hir::{Adt, Callable, HirDisplay, Semantics, Type};
2use ra_ide_db::RootDatabase; 2use ra_ide_db::RootDatabase;
3use ra_prof::profile;
4use ra_syntax::{ 3use ra_syntax::{
5 ast::{self, ArgListOwner, AstNode}, 4 ast::{self, ArgListOwner, AstNode},
6 match_ast, Direction, NodeOrToken, SmolStr, SyntaxKind, TextRange, T, 5 match_ast, Direction, NodeOrToken, SmolStr, SyntaxKind, TextRange, T,
@@ -64,7 +63,7 @@ pub(crate) fn inlay_hints(
64 file_id: FileId, 63 file_id: FileId,
65 config: &InlayHintsConfig, 64 config: &InlayHintsConfig,
66) -> Vec<InlayHint> { 65) -> Vec<InlayHint> {
67 let _p = profile("inlay_hints"); 66 let _p = profile::span("inlay_hints");
68 let sema = Semantics::new(db); 67 let sema = Semantics::new(db);
69 let file = sema.parse(file_id); 68 let file = sema.parse(file_id);
70 69
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs
index 89fcb6f17..bfcf5d750 100644
--- a/crates/ra_ide/src/lib.rs
+++ b/crates/ra_ide/src/lib.rs
@@ -176,7 +176,7 @@ impl AnalysisHost {
176 self.db.collect_garbage(); 176 self.db.collect_garbage();
177 } 177 }
178 /// NB: this clears the database 178 /// NB: this clears the database
179 pub fn per_query_memory_usage(&mut self) -> Vec<(String, ra_prof::Bytes)> { 179 pub fn per_query_memory_usage(&mut self) -> Vec<(String, profile::Bytes)> {
180 self.db.per_query_memory_usage() 180 self.db.per_query_memory_usage()
181 } 181 }
182 pub fn request_cancellation(&mut self) { 182 pub fn request_cancellation(&mut self) {
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs
index 453985de3..c4eea3a45 100644
--- a/crates/ra_ide/src/references.rs
+++ b/crates/ra_ide/src/references.rs
@@ -17,7 +17,6 @@ use ra_ide_db::{
17 search::SearchScope, 17 search::SearchScope,
18 RootDatabase, 18 RootDatabase,
19}; 19};
20use ra_prof::profile;
21use ra_syntax::{ 20use ra_syntax::{
22 algo::find_node_at_offset, 21 algo::find_node_at_offset,
23 ast::{self, NameOwner}, 22 ast::{self, NameOwner},
@@ -90,7 +89,7 @@ pub(crate) fn find_all_refs(
90 position: FilePosition, 89 position: FilePosition,
91 search_scope: Option<SearchScope>, 90 search_scope: Option<SearchScope>,
92) -> Option<RangeInfo<ReferenceSearchResult>> { 91) -> Option<RangeInfo<ReferenceSearchResult>> {
93 let _p = profile("find_all_refs"); 92 let _p = profile::span("find_all_refs");
94 let syntax = sema.parse(position.file_id).syntax().clone(); 93 let syntax = sema.parse(position.file_id).syntax().clone();
95 94
96 let (opt_name, search_kind) = if let Some(name) = 95 let (opt_name, search_kind) = if let Some(name) =
diff --git a/crates/ra_ide/src/status.rs b/crates/ra_ide/src/status.rs
index 08e6f69cb..009bb662f 100644
--- a/crates/ra_ide/src/status.rs
+++ b/crates/ra_ide/src/status.rs
@@ -1,6 +1,7 @@
1use std::{fmt, iter::FromIterator, sync::Arc}; 1use std::{fmt, iter::FromIterator, sync::Arc};
2 2
3use hir::MacroFile; 3use hir::MacroFile;
4use profile::{memory_usage, Bytes};
4use ra_db::{ 5use ra_db::{
5 salsa::debug::{DebugQueryTable, TableEntry}, 6 salsa::debug::{DebugQueryTable, TableEntry},
6 FileTextQuery, SourceRootId, 7 FileTextQuery, SourceRootId,
@@ -9,7 +10,6 @@ use ra_ide_db::{
9 symbol_index::{LibrarySymbolsQuery, SymbolIndex}, 10 symbol_index::{LibrarySymbolsQuery, SymbolIndex},
10 RootDatabase, 11 RootDatabase,
11}; 12};
12use ra_prof::{memory_usage, Bytes};
13use ra_syntax::{ast, Parse, SyntaxNode}; 13use ra_syntax::{ast, Parse, SyntaxNode};
14use rustc_hash::FxHashMap; 14use rustc_hash::FxHashMap;
15 15
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index c10e15db8..ebdf05127 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -9,7 +9,6 @@ use ra_ide_db::{
9 defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass}, 9 defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass},
10 RootDatabase, 10 RootDatabase,
11}; 11};
12use ra_prof::profile;
13use ra_syntax::{ 12use ra_syntax::{
14 ast::{self, HasFormatSpecifier}, 13 ast::{self, HasFormatSpecifier},
15 AstNode, AstToken, Direction, NodeOrToken, SyntaxElement, 14 AstNode, AstToken, Direction, NodeOrToken, SyntaxElement,
@@ -46,7 +45,7 @@ pub(crate) fn highlight(
46 range_to_highlight: Option<TextRange>, 45 range_to_highlight: Option<TextRange>,
47 syntactic_name_ref_highlighting: bool, 46 syntactic_name_ref_highlighting: bool,
48) -> Vec<HighlightedRange> { 47) -> Vec<HighlightedRange> {
49 let _p = profile("highlight"); 48 let _p = profile::span("highlight");
50 let sema = Semantics::new(db); 49 let sema = Semantics::new(db);
51 50
52 // Determine the root based on the given range. 51 // Determine the root based on the given range.