aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-05 13:23:41 +0000
committerGitHub <[email protected]>2020-03-05 13:23:41 +0000
commitfc4d0a7768c95ba50a224cab401b3a04501463d3 (patch)
tree83825ac51ac9359e9baa5e26311cfa6e187a5ff5 /crates/ra_hir_def/src
parentf3f39b4327ea2dd0a91455df7e3bae1972c060e9 (diff)
parentb96da48809ec79b0e133bcb2bc220fb28885eb52 (diff)
Merge #3476
3476: Add profiling calls r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r--crates/ra_hir_def/src/data.rs2
-rw-r--r--crates/ra_hir_def/src/generics.rs2
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};
9use ra_prof::profile;
9use ra_syntax::ast::{self, AstNode, ImplItem, ModuleItemOwner, NameOwner, TypeAscriptionOwner}; 10use ra_syntax::ast::{self, AstNode, ImplItem, ModuleItemOwner, NameOwner, TypeAscriptionOwner};
10 11
11use crate::{ 12use crate::{
@@ -186,6 +187,7 @@ pub struct ImplData {
186 187
187impl ImplData { 188impl 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};
12use ra_arena::{map::ArenaMap, Arena}; 12use ra_arena::{map::ArenaMap, Arena};
13use ra_db::FileId; 13use ra_db::FileId;
14use ra_prof::profile;
14use ra_syntax::ast::{self, NameOwner, TypeBoundsOwner, TypeParamsOwner}; 15use ra_syntax::ast::{self, NameOwner, TypeBoundsOwner, TypeParamsOwner};
15 16
16use crate::{ 17use 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 }