From e903f58d29662b5509fb20c74d7c4131271bfbf0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 21 Dec 2019 19:40:20 +0100 Subject: More profiling --- crates/ra_hir_def/src/adt.rs | 2 ++ crates/ra_hir_def/src/nameres/raw.rs | 2 ++ 2 files changed, 4 insertions(+) (limited to 'crates/ra_hir_def/src') diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index ec3d57d1a..d9ea693e3 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs @@ -8,6 +8,7 @@ use hir_expand::{ InFile, }; use ra_arena::{map::ArenaMap, Arena}; +use ra_prof::profile; use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner}; use crate::{ @@ -72,6 +73,7 @@ impl StructData { impl EnumData { pub(crate) fn enum_data_query(db: &impl DefDatabase, e: EnumId) -> Arc { + let _p = profile("enum_data_query"); let src = e.lookup(db).source(db); let name = src.value.name().map_or_else(Name::missing, |n| n.as_name()); let mut trace = Trace::new_for_arena(); diff --git a/crates/ra_hir_def/src/nameres/raw.rs b/crates/ra_hir_def/src/nameres/raw.rs index 1b83b2247..73dc08745 100644 --- a/crates/ra_hir_def/src/nameres/raw.rs +++ b/crates/ra_hir_def/src/nameres/raw.rs @@ -14,6 +14,7 @@ use hir_expand::{ name::{AsName, Name}, }; use ra_arena::{impl_arena_id, Arena, RawId}; +use ra_prof::profile; use ra_syntax::{ ast::{self, AttrsOwner, NameOwner}, AstNode, @@ -42,6 +43,7 @@ impl RawItems { db: &(impl DefDatabase + AstDatabase), file_id: HirFileId, ) -> Arc { + let _p = profile("raw_items_query"); let mut collector = RawItemsCollector { raw_items: RawItems::default(), source_ast_id_map: db.ast_id_map(file_id), -- cgit v1.2.3