Skip to content

Commit 485ff3e

Browse files
committed
utils: gussy up timing information summary for Windows
Emit this in a `finally` block ensuring that it is printed at the end under all circumstances. Reduce the column width by making the checkout `SourceCache` relative.
1 parent 17c1f4b commit 485ff3e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

utils/build.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ function Build-CMakeProject {
767767
if ($Summary) {
768768
$TimingData.Add([PSCustomObject]@{
769769
Arch = $Arch.ShortName
770-
Checkout = $Src
770+
Checkout = $Src.Replace($SourceCache, '')
771771
BuildID = Split-Path -Path $Bin -Leaf
772772
"Elapsed Time" = $Stopwatch.Elapsed.ToString()
773773
})
@@ -827,7 +827,7 @@ function Build-SPMProject {
827827
if ($Summary) {
828828
$TimingData.Add([PSCustomObject]@{
829829
Arch = $Arch.ShortName
830-
Checkout = $Src
830+
Checkout = $Src.Replace($SourceCache, '')
831831
BuildID = Split-Path -Path $Bin -Leaf
832832
"Elapsed Time" = $Stopwatch.Elapsed.ToString()
833833
})
@@ -1881,10 +1881,6 @@ if ($Stage) {
18811881
Stage-BuildArtifacts $HostArch
18821882
}
18831883

1884-
if ($Summary) {
1885-
$TimingData | Select Arch,Checkout,BuildID,"Elapsed Time" | Sort -Descending -Property "Elapsed Time" | Format-Table -AutoSize
1886-
}
1887-
18881884
if ($Test -ne $null -and (Compare-Object $Test @("clang", "lld", "lldb", "llvm", "swift") -PassThru -IncludeEqual -ExcludeDifferent) -ne $null) {
18891885
$Tests = @{
18901886
"-TestClang" = $Test -contains "clang";
@@ -1927,4 +1923,8 @@ if ($Test -contains "llbuild") { Build-LLBuild $HostArch -Test }
19271923
}
19281924

19291925
exit 1
1926+
} finally {
1927+
if ($Summary) {
1928+
$TimingData | Select Arch,Checkout,BuildID,"Elapsed Time" | Sort -Descending -Property "Elapsed Time" | Format-Table -AutoSize
1929+
}
19301930
}

0 commit comments

Comments
 (0)