From f5bf7f29b58d0ae93a87d41b3d893a64c8b66bf3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 23 Oct 2019 18:26:43 +0300 Subject: add couple of profiling calls --- crates/ra_lsp_server/src/main_loop/handlers.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_lsp_server') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 307082865..e65f075a6 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -438,6 +438,7 @@ pub fn handle_prepare_rename( world: WorldSnapshot, params: req::TextDocumentPositionParams, ) -> Result> { + let _p = profile("handle_prepare_rename"); let position = params.try_conv_with(&world)?; // We support renaming references like handle_rename does. @@ -455,6 +456,7 @@ pub fn handle_prepare_rename( } pub fn handle_rename(world: WorldSnapshot, params: RenameParams) -> Result> { + let _p = profile("handle_rename"); let position = params.text_document_position.try_conv_with(&world)?; if params.new_name.is_empty() { @@ -480,6 +482,7 @@ pub fn handle_references( world: WorldSnapshot, params: req::ReferenceParams, ) -> Result>> { + let _p = profile("handle_references"); let position = params.text_document_position.try_conv_with(&world)?; let refs = match world.analysis().find_all_refs(position)? { @@ -741,6 +744,7 @@ pub fn handle_document_highlight( world: WorldSnapshot, params: req::TextDocumentPositionParams, ) -> Result>> { + let _p = profile("handle_document_highlight"); let file_id = params.text_document.try_conv_with(&world)?; let line_index = world.analysis().file_line_index(file_id)?; -- cgit v1.2.3