Skip to content

Commit

Permalink
Add TestImportPerformance task
Browse files Browse the repository at this point in the history
  • Loading branch information
devblackops committed Nov 17, 2023
1 parent 127e455 commit 8a35847
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions psakeFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ task TestGHAction -depends Build, InstallAct {
act -j test -P ubuntu-latest=nektos/act-environments-ubuntu:18.04
}

task TestImportPerformance {
(Measure-Command { pwsh -nop -c {Import-Module ./Output/Terminal-Icons/0.12.0/Terminal-Icons.psd1}}).TotalMilliseconds
| Measure-Object -Average

$trace = Trace-Script -ScriptBlock {Import-Module ./Output/Terminal-Icons/0.12.0/Terminal-Icons.psd1 -Force }
$trace.AllLines | Format-Table
}

function New-EmptyColorTheme {
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
[OutputType([hashtable])]
Expand Down

0 comments on commit 8a35847

Please sign in to comment.