From b96da48809ec79b0e133bcb2bc220fb28885eb52 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 5 Mar 2020 14:21:47 +0100 Subject: Add profiling calls --- crates/ra_hir_def/src/data.rs | 2 ++ crates/ra_hir_def/src/generics.rs | 2 ++ 2 files changed, 4 insertions(+) (limited to 'crates/ra_hir_def') 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::{ 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 { + let _p = profile("impl_data_query"); let impl_loc = id.lookup(db); let src = impl_loc.source(db); 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::{ }; 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 @@ impl GenericParams { db: &impl DefDatabase, def: GenericDefId, ) -> Arc { + let _p = profile("generic_params_query"); let (params, _source_map) = GenericParams::new(db, def); Arc::new(params) } -- cgit v1.2.3