File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ import * as vscode from "vscode";
66import { sendError , sendInfo } from "vscode-extension-telemetry-wrapper" ;
77import { LSDaemon } from "./daemon" ;
88
9+ const INTERESTED_REQUESTS : Set < string > = new Set ( [
10+ "initialize" ,
11+ "textDocument/completion" ,
12+ ] ) ;
913const delay = promisify ( setTimeout ) ;
1014
1115let daemon : LSDaemon ;
@@ -46,6 +50,17 @@ async function checkJavaExtActivated(_context: vscode.ExtensionContext): Promise
4650 return false ;
4751 }
4852
53+ // Trace the interested LSP requests performance
54+ javaExt . exports ?. onDidRequestEnd ( ( traceEvent : any ) => {
55+ if ( INTERESTED_REQUESTS . has ( traceEvent . type ) ) {
56+ sendInfo ( "" , {
57+ name : "lsp" ,
58+ kind : traceEvent . type ,
59+ duration : Math . trunc ( traceEvent . duration ) ,
60+ } ) ;
61+ }
62+ } ) ;
63+
4964 // on ServiceReady
5065 javaExt . exports . onDidServerModeChange ( async ( mode : string ) => {
5166 if ( mode === "Hybrid" ) { // begin to start standard language server
You can’t perform that action at this time.
0 commit comments