From fe90ba650d926fb006948499a96c9dabb149eed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 1 Dec 2023 03:54:59 +0100 Subject: refactor(lsp): log names (#21413) This commit changes LSP log names by prefixing them, we now have these prefixes: - `lsp.*` - requests coming from the client - `tsc.request.*` - requests coming from clients that are routed to TSC - `tsc.op.*` - ops called by the TS host - `tsc.host.*` - requests that call JavaScript runtime that runs TypeScript compiler host Additionall `Performance::mark` was split into `Performance::mark` and `Performance::mark_with_args` to reduce verbosity of code and logs. --- cli/tests/integration/lsp_tests.rs | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'cli/tests') diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index 49b8bb495..26268f0a4 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -8303,23 +8303,27 @@ fn lsp_performance() { assert_eq!( averages, vec![ - "did_open", - "hover", - "initialize", - "op_load", - "request", - "testing_update", - "tsc $configure", - "tsc $getAssets", - "tsc $getSupportedCodeFixes", - "tsc getQuickInfoAtPosition", - "update_cache", - "update_diagnostics_deps", - "update_diagnostics_lint", - "update_diagnostics_ts", - "update_import_map", - "update_registries", - "update_tsconfig", + "lsp.did_open", + "lsp.hover", + "lsp.initialize", + "lsp.testing_update", + "lsp.update_cache", + "lsp.update_diagnostics_deps", + "lsp.update_diagnostics_lint", + "lsp.update_diagnostics_ts", + "lsp.update_import_map", + "lsp.update_registries", + "lsp.update_tsconfig", + "tsc.host.$configure", + "tsc.host.$getAssets", + "tsc.host.$getDiagnostics", + "tsc.host.$getSupportedCodeFixes", + "tsc.host.getQuickInfoAtPosition", + "tsc.op.op_load", + "tsc.request.$configure", + "tsc.request.$getAssets", + "tsc.request.$getSupportedCodeFixes", + "tsc.request.getQuickInfoAtPosition", ] ); client.shutdown(); -- cgit v1.2.3