From 7aa71d63a41fc44b1cc0ce2f439c4effa04fc2e4 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 5 Jan 2021 12:28:37 +0300 Subject: [PATCH] add taking time logs to the publish.ps1 --- npm/publish.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/npm/publish.ps1 b/npm/publish.ps1 index d6ef361224..22ac73810d 100644 --- a/npm/publish.ps1 +++ b/npm/publish.ps1 @@ -39,6 +39,7 @@ $commands = ( ) foreach ($command in $commands) { + $timer = [System.Diagnostics.Stopwatch]::StartNew() Write-Host $command Invoke-Expression $command if ($LASTEXITCODE -ne '0' -And $command -notlike '*cd *') { @@ -46,4 +47,9 @@ foreach ($command in $commands) { Set-Location $RootFolder exit $LASTEXITCODE } + $timer.Stop() + $total = $timer.Elapsed + Write-Output "-------------------------" + Write-Output "$command command took $total (Hours:Minutes:Seconds:Milliseconds)" + Write-Output "-------------------------" } \ No newline at end of file