From 7e7ea0e79dc70fc45aa2bf51f210aaaaf2208060 Mon Sep 17 00:00:00 2001 From: Marco Groppo Date: Sun, 5 May 2019 16:32:53 +0200 Subject: Profile diagnostics. --- crates/ra_ide_api/src/diagnostics.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 2dfaa0045..b27cb690a 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs @@ -8,6 +8,7 @@ use ra_syntax::{ ast::{self, AstNode}, }; use ra_text_edit::{TextEdit, TextEditBuilder}; +use ra_prof::profile; use crate::{Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit, db::RootDatabase}; @@ -18,6 +19,7 @@ pub enum Severity { } pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec { + let _p = profile("diagnostics"); let source_file = db.parse(file_id); let mut res = Vec::new(); -- cgit v1.2.3