mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Add profiling calls
This commit is contained in:
parent
f3f39b4327
commit
b96da48809
2 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,7 @@ use hir_expand::{
|
||||||
name::{name, AsName, Name},
|
name::{name, AsName, Name},
|
||||||
AstId, InFile,
|
AstId, InFile,
|
||||||
};
|
};
|
||||||
|
use ra_prof::profile;
|
||||||
use ra_syntax::ast::{self, AstNode, ImplItem, ModuleItemOwner, NameOwner, TypeAscriptionOwner};
|
use ra_syntax::ast::{self, AstNode, ImplItem, ModuleItemOwner, NameOwner, TypeAscriptionOwner};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -186,6 +187,7 @@ pub struct ImplData {
|
||||||
|
|
||||||
impl ImplData {
|
impl ImplData {
|
||||||
pub(crate) fn impl_data_query(db: &impl DefDatabase, id: ImplId) -> Arc<ImplData> {
|
pub(crate) fn impl_data_query(db: &impl DefDatabase, id: ImplId) -> Arc<ImplData> {
|
||||||
|
let _p = profile("impl_data_query");
|
||||||
let impl_loc = id.lookup(db);
|
let impl_loc = id.lookup(db);
|
||||||
let src = impl_loc.source(db);
|
let src = impl_loc.source(db);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ use hir_expand::{
|
||||||
};
|
};
|
||||||
use ra_arena::{map::ArenaMap, Arena};
|
use ra_arena::{map::ArenaMap, Arena};
|
||||||
use ra_db::FileId;
|
use ra_db::FileId;
|
||||||
|
use ra_prof::profile;
|
||||||
use ra_syntax::ast::{self, NameOwner, TypeBoundsOwner, TypeParamsOwner};
|
use ra_syntax::ast::{self, NameOwner, TypeBoundsOwner, TypeParamsOwner};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -71,6 +72,7 @@ impl GenericParams {
|
||||||
db: &impl DefDatabase,
|
db: &impl DefDatabase,
|
||||||
def: GenericDefId,
|
def: GenericDefId,
|
||||||
) -> Arc<GenericParams> {
|
) -> Arc<GenericParams> {
|
||||||
|
let _p = profile("generic_params_query");
|
||||||
let (params, _source_map) = GenericParams::new(db, def);
|
let (params, _source_map) = GenericParams::new(db, def);
|
||||||
Arc::new(params)
|
Arc::new(params)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue