Skip to content

Commit fc4d0a7

Browse files
bors[bot]matklad
andauthored
Merge #3476
3476: Add profiling calls r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 parents f3f39b4 + b96da48 commit fc4d0a7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

crates/ra_hir_def/src/data.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use hir_expand::{
66
name::{name, AsName, Name},
77
AstId, InFile,
88
};
9+
use ra_prof::profile;
910
use ra_syntax::ast::{self, AstNode, ImplItem, ModuleItemOwner, NameOwner, TypeAscriptionOwner};
1011

1112
use crate::{
@@ -186,6 +187,7 @@ pub struct ImplData {
186187

187188
impl ImplData {
188189
pub(crate) fn impl_data_query(db: &impl DefDatabase, id: ImplId) -> Arc<ImplData> {
190+
let _p = profile("impl_data_query");
189191
let impl_loc = id.lookup(db);
190192
let src = impl_loc.source(db);
191193

crates/ra_hir_def/src/generics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use hir_expand::{
1111
};
1212
use ra_arena::{map::ArenaMap, Arena};
1313
use ra_db::FileId;
14+
use ra_prof::profile;
1415
use ra_syntax::ast::{self, NameOwner, TypeBoundsOwner, TypeParamsOwner};
1516

1617
use crate::{
@@ -71,6 +72,7 @@ impl GenericParams {
7172
db: &impl DefDatabase,
7273
def: GenericDefId,
7374
) -> Arc<GenericParams> {
75+
let _p = profile("generic_params_query");
7476
let (params, _source_map) = GenericParams::new(db, def);
7577
Arc::new(params)
7678
}

0 commit comments

Comments
 (0)