diff options
Diffstat (limited to 'crates/ra_ide')
-rw-r--r-- | crates/ra_ide/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_ide/src/diagnostics.rs | 3 | ||||
-rw-r--r-- | crates/ra_ide/src/inlay_hints.rs | 3 | ||||
-rw-r--r-- | crates/ra_ide/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide/src/references.rs | 3 | ||||
-rw-r--r-- | crates/ra_ide/src/status.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 3 |
7 files changed, 7 insertions, 11 deletions
diff --git a/crates/ra_ide/Cargo.toml b/crates/ra_ide/Cargo.toml index f4181c4eb..bbc9ba4e7 100644 --- a/crates/ra_ide/Cargo.toml +++ b/crates/ra_ide/Cargo.toml | |||
@@ -27,7 +27,7 @@ ra_db = { path = "../ra_db" } | |||
27 | ra_ide_db = { path = "../ra_ide_db" } | 27 | ra_ide_db = { path = "../ra_ide_db" } |
28 | ra_cfg = { path = "../ra_cfg" } | 28 | ra_cfg = { path = "../ra_cfg" } |
29 | ra_fmt = { path = "../ra_fmt" } | 29 | ra_fmt = { path = "../ra_fmt" } |
30 | ra_prof = { path = "../ra_prof" } | 30 | profile = { path = "../profile" } |
31 | test_utils = { path = "../test_utils" } | 31 | test_utils = { path = "../test_utils" } |
32 | ra_assists = { path = "../ra_assists" } | 32 | ra_assists = { path = "../ra_assists" } |
33 | ra_ssr = { path = "../ra_ssr" } | 33 | ra_ssr = { path = "../ra_ssr" } |
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}; | |||
10 | use itertools::Itertools; | 10 | use itertools::Itertools; |
11 | use ra_db::SourceDatabase; | 11 | use ra_db::SourceDatabase; |
12 | use ra_ide_db::RootDatabase; | 12 | use ra_ide_db::RootDatabase; |
13 | use ra_prof::profile; | ||
14 | use ra_syntax::{ | 13 | use 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 @@ | |||
1 | use hir::{Adt, Callable, HirDisplay, Semantics, Type}; | 1 | use hir::{Adt, Callable, HirDisplay, Semantics, Type}; |
2 | use ra_ide_db::RootDatabase; | 2 | use ra_ide_db::RootDatabase; |
3 | use ra_prof::profile; | ||
4 | use ra_syntax::{ | 3 | use 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 | }; |
20 | use ra_prof::profile; | ||
21 | use ra_syntax::{ | 20 | use 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 @@ | |||
1 | use std::{fmt, iter::FromIterator, sync::Arc}; | 1 | use std::{fmt, iter::FromIterator, sync::Arc}; |
2 | 2 | ||
3 | use hir::MacroFile; | 3 | use hir::MacroFile; |
4 | use profile::{memory_usage, Bytes}; | ||
4 | use ra_db::{ | 5 | use 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 | }; |
12 | use ra_prof::{memory_usage, Bytes}; | ||
13 | use ra_syntax::{ast, Parse, SyntaxNode}; | 13 | use ra_syntax::{ast, Parse, SyntaxNode}; |
14 | use rustc_hash::FxHashMap; | 14 | use 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 | }; |
12 | use ra_prof::profile; | ||
13 | use ra_syntax::{ | 12 | use 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. |