File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/PowerShellEditorServices/Language Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1313
1414namespace Microsoft . PowerShell . EditorServices
1515{
16+ using System . Diagnostics ;
1617 using System . Management . Automation ;
1718 using System . Management . Automation . Language ;
1819 using System . Management . Automation . Runspaces ;
@@ -101,13 +102,20 @@ static public async Task<CommandCompletion> GetCompletions(
101102 {
102103 powerShell . Runspace = runspaceHandle . Runspace ;
103104
105+ Stopwatch stopwatch = new Stopwatch ( ) ;
106+ stopwatch . Start ( ) ;
107+
104108 commandCompletion =
105109 CommandCompletion . CompleteInput (
106110 scriptAst ,
107111 currentTokens ,
108112 cursorPosition ,
109113 null ,
110114 powerShell ) ;
115+
116+ stopwatch . Stop ( ) ;
117+
118+ Logger . Write ( LogLevel . Verbose , $ "IntelliSense completed in { stopwatch . ElapsedMilliseconds } ms.") ;
111119 }
112120 }
113121
You can’t perform that action at this time.
0 commit comments