aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-10-23 16:26:43 +0100
committerAleksey Kladov <[email protected]>2019-10-23 16:26:43 +0100
commitf5bf7f29b58d0ae93a87d41b3d893a64c8b66bf3 (patch)
tree16955f94e57878fbf739a5a3efd60193671cc7a9 /crates/ra_lsp_server/src
parentd2e1f9f6da01132fd23394b5b789e4ef96ccc444 (diff)
add couple of profiling calls
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs4
1 files changed, 4 insertions, 0 deletions
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(
438 world: WorldSnapshot, 438 world: WorldSnapshot,
439 params: req::TextDocumentPositionParams, 439 params: req::TextDocumentPositionParams,
440) -> Result<Option<PrepareRenameResponse>> { 440) -> Result<Option<PrepareRenameResponse>> {
441 let _p = profile("handle_prepare_rename");
441 let position = params.try_conv_with(&world)?; 442 let position = params.try_conv_with(&world)?;
442 443
443 // We support renaming references like handle_rename does. 444 // We support renaming references like handle_rename does.
@@ -455,6 +456,7 @@ pub fn handle_prepare_rename(
455} 456}
456 457
457pub fn handle_rename(world: WorldSnapshot, params: RenameParams) -> Result<Option<WorkspaceEdit>> { 458pub fn handle_rename(world: WorldSnapshot, params: RenameParams) -> Result<Option<WorkspaceEdit>> {
459 let _p = profile("handle_rename");
458 let position = params.text_document_position.try_conv_with(&world)?; 460 let position = params.text_document_position.try_conv_with(&world)?;
459 461
460 if params.new_name.is_empty() { 462 if params.new_name.is_empty() {
@@ -480,6 +482,7 @@ pub fn handle_references(
480 world: WorldSnapshot, 482 world: WorldSnapshot,
481 params: req::ReferenceParams, 483 params: req::ReferenceParams,
482) -> Result<Option<Vec<Location>>> { 484) -> Result<Option<Vec<Location>>> {
485 let _p = profile("handle_references");
483 let position = params.text_document_position.try_conv_with(&world)?; 486 let position = params.text_document_position.try_conv_with(&world)?;
484 487
485 let refs = match world.analysis().find_all_refs(position)? { 488 let refs = match world.analysis().find_all_refs(position)? {
@@ -741,6 +744,7 @@ pub fn handle_document_highlight(
741 world: WorldSnapshot, 744 world: WorldSnapshot,
742 params: req::TextDocumentPositionParams, 745 params: req::TextDocumentPositionParams,
743) -> Result<Option<Vec<DocumentHighlight>>> { 746) -> Result<Option<Vec<DocumentHighlight>>> {
747 let _p = profile("handle_document_highlight");
744 let file_id = params.text_document.try_conv_with(&world)?; 748 let file_id = params.text_document.try_conv_with(&world)?;
745 let line_index = world.analysis().file_line_index(file_id)?; 749 let line_index = world.analysis().file_line_index(file_id)?;
746 750