IISResetMe / PSProfiler

PowerShell Script Profiler
MIT License
124 stars 9 forks source link

add color for top 5 slowest times #13

Closed SteveL-MSFT closed 3 years ago

SteveL-MSFT commented 3 years ago

Fix build.ps1 to work on macOS by using new-item instead of mkdir Update Measure-Script to find top 5 slowest lines and mark them as Top using a new member Update formatting where Top is $true and $PSStyle exists, then use a red background

This makes it easy to see which top 5 lines are slowest

IISResetMe commented 3 years ago

Excellent feature idea!

I've parameterized the $Top count - 5 might be too noisy when profiling small snippets, but not perhaps not comprehensive enough if you're looking at 100s (or 1000s 🙈 ) of lines of code.

Thanks @SteveL-MSFT @ajansveld for your contribution!