3476: Add profiling calls r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-03-05 13:23:41 +00:00 committed by GitHub
commit fc4d0a7768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@
name::{name, AsName, Name},
AstId, InFile,
};
use ra_prof::profile;
use ra_syntax::ast::{self, AstNode, ImplItem, ModuleItemOwner, NameOwner, TypeAscriptionOwner};
use crate::{
@ -186,6 +187,7 @@ pub struct ImplData {
impl 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 src = impl_loc.source(db);

View File

@ -11,6 +11,7 @@
};
use ra_arena::{map::ArenaMap, Arena};
use ra_db::FileId;
use ra_prof::profile;
use ra_syntax::ast::{self, NameOwner, TypeBoundsOwner, TypeParamsOwner};
use crate::{
@ -71,6 +72,7 @@ pub(crate) fn generic_params_query(
db: &impl DefDatabase,
def: GenericDefId,
) -> Arc<GenericParams> {
let _p = profile("generic_params_query");
let (params, _source_map) = GenericParams::new(db, def);
Arc::new(params)
}