File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/PowerShellEditorServices/Services/Analysis Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 55using System . Collections ;
66using System . Collections . Generic ;
77using System . Collections . ObjectModel ;
8+ using System . Diagnostics ;
89using System . Linq ;
910using System . Text ;
1011using System . Threading . Tasks ;
@@ -252,10 +253,12 @@ public void Dispose() =>
252253
253254 private async Task < ScriptFileMarker [ ] > GetSemanticMarkersFromCommandAsync ( PSCommand command )
254255 {
256+ Stopwatch stopwatch = Stopwatch . StartNew ( ) ;
255257 PowerShellResult result = await InvokePowerShellAsync ( command ) . ConfigureAwait ( false ) ;
258+ stopwatch . Stop ( ) ;
256259
257260 IReadOnlyCollection < PSObject > diagnosticResults = result ? . Output ?? s_emptyDiagnosticResult ;
258- _logger . LogDebug ( string . Format ( "Found {0} violations" , diagnosticResults . Count ) ) ;
261+ _logger . LogDebug ( string . Format ( "Found {0} violations in {1}ms " , diagnosticResults . Count , stopwatch . ElapsedMilliseconds ) ) ;
259262
260263 ScriptFileMarker [ ] scriptMarkers = new ScriptFileMarker [ diagnosticResults . Count ] ;
261264 int i = 0 ;
You can’t perform that action at this time.
0 commit comments