Skip to content

Commit c1e0770

Browse files
utils: include Fetch-Dependencies step in build.ps1 time tracking (#78976)
Build bot runtimes are very long and not fully transparent right now. In addition to the steps for build and test, we should keep an eye on Fetch-Dependencies.
1 parent fc85f57 commit c1e0770

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

utils/build.ps1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,11 @@ function Fetch-Dependencies {
718718

719719
if ($SkipBuild -and $SkipPackaging) { return }
720720

721+
$Stopwatch = [Diagnostics.Stopwatch]::StartNew()
722+
if ($ToBatch) {
723+
Write-Host -ForegroundColor Cyan "[$([DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss"))] Fetch-Dependencies..."
724+
}
725+
721726
$WiXURL = "https://www.nuget.org/api/v2/package/wix/$WiXVersion"
722727
$WiXHash = "DF9BDB347183716F82EFE2CECB8C54BB3554AA907A69F47A41741D6FA4D0A754"
723728
DownloadAndVerify $WixURL "$BinaryCache\WiX-$WiXVersion.zip" $WiXHash
@@ -859,6 +864,19 @@ function Fetch-Dependencies {
859864
}
860865
}
861866
}
867+
868+
if (-not $ToBatch) {
869+
Write-Host -ForegroundColor Cyan "[$([DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss"))] Fetch-Dependencies took $($Stopwatch.Elapsed)"
870+
Write-Host ""
871+
}
872+
if ($Summary) {
873+
$TimingData.Add([PSCustomObject]@{
874+
Arch = $BuildArch.LLVMName
875+
Platform = 'Windows'
876+
Checkout = 'Fetch-Dependencies'
877+
"Elapsed Time" = $Stopwatch.Elapsed.ToString()
878+
})
879+
}
862880
}
863881

864882
function Get-PinnedToolchainTool() {

0 commit comments

Comments
 (0)