diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-05 13:23:41 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-05 13:23:41 +0000 |
commit | fc4d0a7768c95ba50a224cab401b3a04501463d3 (patch) | |
tree | 83825ac51ac9359e9baa5e26311cfa6e187a5ff5 /crates | |
parent | f3f39b4327ea2dd0a91455df7e3bae1972c060e9 (diff) | |
parent | b96da48809ec79b0e133bcb2bc220fb28885eb52 (diff) |
Merge #3476
3476: Add profiling calls r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir_def/src/data.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/generics.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs index c5fb9428e..9fc43f3fb 100644 --- a/crates/ra_hir_def/src/data.rs +++ b/crates/ra_hir_def/src/data.rs | |||
@@ -6,6 +6,7 @@ use hir_expand::{ | |||
6 | name::{name, AsName, Name}, | 6 | name::{name, AsName, Name}, |
7 | AstId, InFile, | 7 | AstId, InFile, |
8 | }; | 8 | }; |
9 | use ra_prof::profile; | ||
9 | use ra_syntax::ast::{self, AstNode, ImplItem, ModuleItemOwner, NameOwner, TypeAscriptionOwner}; | 10 | use ra_syntax::ast::{self, AstNode, ImplItem, ModuleItemOwner, NameOwner, TypeAscriptionOwner}; |
10 | 11 | ||
11 | use crate::{ | 12 | use crate::{ |
@@ -186,6 +187,7 @@ pub struct ImplData { | |||
186 | 187 | ||
187 | impl ImplData { | 188 | impl ImplData { |
188 | pub(crate) fn impl_data_query(db: &impl DefDatabase, id: ImplId) -> Arc<ImplData> { | 189 | pub(crate) fn impl_data_query(db: &impl DefDatabase, id: ImplId) -> Arc<ImplData> { |
190 | let _p = profile("impl_data_query"); | ||
189 | let impl_loc = id.lookup(db); | 191 | let impl_loc = id.lookup(db); |
190 | let src = impl_loc.source(db); | 192 | let src = impl_loc.source(db); |
191 | 193 | ||
diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs index e07a4f947..519c60de0 100644 --- a/crates/ra_hir_def/src/generics.rs +++ b/crates/ra_hir_def/src/generics.rs | |||
@@ -11,6 +11,7 @@ use hir_expand::{ | |||
11 | }; | 11 | }; |
12 | use ra_arena::{map::ArenaMap, Arena}; | 12 | use ra_arena::{map::ArenaMap, Arena}; |
13 | use ra_db::FileId; | 13 | use ra_db::FileId; |
14 | use ra_prof::profile; | ||
14 | use ra_syntax::ast::{self, NameOwner, TypeBoundsOwner, TypeParamsOwner}; | 15 | use ra_syntax::ast::{self, NameOwner, TypeBoundsOwner, TypeParamsOwner}; |
15 | 16 | ||
16 | use crate::{ | 17 | use crate::{ |
@@ -71,6 +72,7 @@ impl GenericParams { | |||
71 | db: &impl DefDatabase, | 72 | db: &impl DefDatabase, |
72 | def: GenericDefId, | 73 | def: GenericDefId, |
73 | ) -> Arc<GenericParams> { | 74 | ) -> Arc<GenericParams> { |
75 | let _p = profile("generic_params_query"); | ||
74 | let (params, _source_map) = GenericParams::new(db, def); | 76 | let (params, _source_map) = GenericParams::new(db, def); |
75 | Arc::new(params) | 77 | Arc::new(params) |
76 | } | 78 | } |