From ac1b7b07e770652bad72f024efebfd5790a509c3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 24 Oct 2019 10:37:20 +0300 Subject: add some profiling calls --- crates/ra_ide_api/src/references.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_ide_api/src/references.rs') diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs index f35d835ac..8200bd1ef 100644 --- a/crates/ra_ide_api/src/references.rs +++ b/crates/ra_ide_api/src/references.rs @@ -16,6 +16,7 @@ mod search_scope; use once_cell::unsync::Lazy; use ra_db::{SourceDatabase, SourceDatabaseExt}; +use ra_prof::profile; use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SourceFile, SyntaxNode, TextUnit}; use crate::{db::RootDatabase, FilePosition, FileRange, NavigationTarget, RangeInfo}; @@ -107,6 +108,8 @@ fn find_name<'a>( } fn process_definition(db: &RootDatabase, def: NameDefinition, name: String) -> Vec { + let _p = profile("process_definition"); + let pat = name.as_str(); let scope = def.search_scope(db); let mut refs = vec![]; -- cgit v1.2.3