Skip to content

Commit a6740f4

Browse files
authored
Automate SPMI collection for TE benchmarks (#119098)
1 parent 4e05ab6 commit a6740f4

File tree

5 files changed

+525
-9
lines changed

5 files changed

+525
-9
lines changed

eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ jobs:
101101
- ${{ if eq(parameters.collectionName, 'realworld') }}:
102102
- name: InputDirectory
103103
value: '$(Core_Root_Dir)'
104+
- ${{ if eq(parameters.collectionName, 'aspnet2') }}:
105+
- name: InputDirectory
106+
value: '$(Core_Root_Dir)'
104107
- ${{ if eq(parameters.collectionName, 'coreclr_tests') }}:
105108
- name: InputDirectory
106109
value: '$(managedTestArtifactRootFolderPath)'

eng/pipelines/coreclr/templates/superpmi-collect-pipeline.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,3 +480,24 @@ extends:
480480
unifiedBuildConfigOverride: checked
481481
# Default timeout is 150 minutes, which is too low for osx-arm64 queue.
482482
timeoutInMinutes: 300
483+
484+
#
485+
# Collection of aspnet/TechEmpower benchmarks (crank-based): aspnet2
486+
#
487+
- template: /eng/pipelines/common/platform-matrix.yml
488+
parameters:
489+
jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml
490+
buildConfig: checked
491+
platforms:
492+
- osx_arm64
493+
- linux_arm64
494+
# - linux_x64 # currently runs of disk space too often.
495+
- windows_x64
496+
- windows_arm64
497+
helixQueueGroup: ci
498+
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
499+
jobParameters:
500+
testGroup: outerloop
501+
liveLibrariesBuildConfig: Release
502+
collectionType: run
503+
collectionName: aspnet2

src/coreclr/scripts/superpmi-collect.proj

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@
6868

6969
<!-- OS-specific settings for non-benchmarks collections -->
7070

71-
<PropertyGroup Condition=" '$(CollectionName)' != 'benchmarks' and '$(CollectionName)' != 'realworld' and '$(AGENT_OS)' == 'Windows_NT' ">
71+
<PropertyGroup Condition=" '$(CollectionName)' != 'benchmarks' and '$(CollectionName)' != 'realworld' and '$(CollectionName)' != 'aspnet2' and '$(AGENT_OS)' == 'Windows_NT' ">
7272
<AssembliesDirectoryOnHelix>%HELIX_WORKITEM_PAYLOAD%\binaries</AssembliesDirectoryOnHelix>
7373
</PropertyGroup>
74-
<PropertyGroup Condition=" '$(CollectionName)' != 'benchmarks' and '$(CollectionName)' != 'realworld' and '$(AGENT_OS)' != 'Windows_NT' ">
74+
<PropertyGroup Condition=" '$(CollectionName)' != 'benchmarks' and '$(CollectionName)' != 'realworld' and '$(CollectionName)' != 'aspnet2' and '$(AGENT_OS)' != 'Windows_NT' ">
7575
<AssembliesDirectoryOnHelix>$HELIX_WORKITEM_PAYLOAD/binaries</AssembliesDirectoryOnHelix>
7676
</PropertyGroup>
7777

@@ -84,6 +84,15 @@
8484
<PerformanceDirectory>$HELIX_WORKITEM_PAYLOAD/performance</PerformanceDirectory>
8585
</PropertyGroup>
8686

87+
<!-- OS-specific settings for aspnet2 collections -->
88+
89+
<PropertyGroup Condition=" '$(CollectionName)' == 'aspnet2' and '$(AGENT_OS)' == 'Windows_NT' ">
90+
<CrankWorkDirectory>%HELIX_WORKITEM_PAYLOAD%</CrankWorkDirectory>
91+
</PropertyGroup>
92+
<PropertyGroup Condition=" '$(CollectionName)' == 'aspnet2' and '$(AGENT_OS)' != 'Windows_NT' ">
93+
<CrankWorkDirectory>$HELIX_WORKITEM_PAYLOAD</CrankWorkDirectory>
94+
</PropertyGroup>
95+
8796
<!-- Common non-OS-specific settings -->
8897

8998
<PropertyGroup>
@@ -138,7 +147,7 @@
138147

139148
<!-- Define the Helix work item command and timeout for each collection type -->
140149

141-
<PropertyGroup Condition="'$(CollectionName)' != 'benchmarks' and '$(CollectionName)' != 'realworld'">
150+
<PropertyGroup Condition="'$(CollectionName)' != 'benchmarks' and '$(CollectionName)' != 'realworld' and '$(CollectionName)' != 'aspnet2'">
142151
<WorkItemCommand>$(Python) $(SuperPMIDirectory)$(FileSeparatorChar)superpmi.py collect --clean -log_level DEBUG --$(CollectionType) $(PmiArguments) $(InputKind) $(AssembliesDirectoryOnHelix) -arch $(Architecture) -build_type $(BuildConfig) -core_root $(SuperPMIDirectory)</WorkItemCommand>
143152
<WorkItemTimeout>2:00</WorkItemTimeout>
144153
</PropertyGroup>
@@ -148,6 +157,11 @@
148157
<WorkItemTimeout>3:00</WorkItemTimeout>
149158
</PropertyGroup>
150159

160+
<PropertyGroup Condition="'$(CollectionName)' == 'aspnet2'">
161+
<WorkItemCommand>$(Python) $(SuperPMIDirectory)$(FileSeparatorChar)superpmi_aspnet2.py --core_root $(SuperPMIDirectory) --work_dir $(CrankWorkDirectory) </WorkItemCommand>
162+
<WorkItemTimeout>3:00</WorkItemTimeout>
163+
</PropertyGroup>
164+
151165
<PropertyGroup>
152166
<EnableAzurePipelinesReporter>false</EnableAzurePipelinesReporter>
153167
<EnableXUnitReporter>false</EnableXUnitReporter>
@@ -157,6 +171,18 @@
157171
<ItemGroup Condition=" '$(AGENT_OS)' == 'Windows_NT' ">
158172
<HelixPreCommand Include="taskkill.exe /f /im corerun.exe"/>
159173
<HelixPostCommand Include="taskkill.exe /f /im corerun.exe"/>
174+
175+
<HelixPreCommand Include="taskkill.exe /f /im crank-agent.exe"/>
176+
<HelixPostCommand Include="taskkill.exe /f /im crank-agent.exe"/>
177+
</ItemGroup>
178+
179+
<ItemGroup Condition=" '$(AGENT_OS)' != 'Windows_NT'">
180+
<HelixPreCommand Include="pkill -f crank || true"/>
181+
<HelixPostCommand Include="pkill -f crank || true"/>
182+
183+
<!-- Temp workaround, will be removed once https://github.com/dotnet/crank/pull/841 lands -->
184+
<HelixPreCommand Include="sudo tdnf install git -y"/>
185+
<HelixPreCommand Include="sudo tdnf update -y"/>
160186
</ItemGroup>
161187

162188
<!-- We're currently not using .dotnet on the Helix agents -->
@@ -197,7 +223,7 @@
197223
<!-- For non-benchmark collections, we create one Helix work item for each sub-directory
198224
in the `InputArtifacts` directory.
199225
-->
200-
<ItemGroup Condition="'$(CollectionName)' != 'benchmarks' and '$(CollectionName)' != 'realworld'">
226+
<ItemGroup Condition="'$(CollectionName)' != 'benchmarks' and '$(CollectionName)' != 'realworld' and '$(CollectionName)' != 'aspnet2'">
201227
<PartitionDirectories Include="$([System.IO.Directory]::GetDirectories($(InputArtifacts)))"/>
202228
<Partition Include="@(PartitionDirectories -> '%(Filename)')" CollectAssemblies="%(Filename)" PartitionId="%(Filename)" />
203229
</ItemGroup>
@@ -262,9 +288,13 @@
262288
<BDN_Partition Include="Partition3" Index="3" BenchmarkPath="src/benchmarks/real-world/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj" BenchmarkBinary="Microsoft.ML.Benchmarks.dll" />
263289
<BDN_Partition Include="Partition4" Index="4" BenchmarkPath="src/benchmarks/real-world/Roslyn/CompilerBenchmarks.csproj" BenchmarkBinary="CompilerBenchmarks.dll" />
264290
<BDN_Partition Include="Partition5" Index="5" BenchmarkPath="src/benchmarks/real-world/PowerShell.Benchmarks/PowerShell.Benchmarks.csproj" BenchmarkBinary="PowerShell.Benchmarks.dll" />
265-
</ItemGroup>
291+
</ItemGroup>
292+
293+
<ItemGroup Condition="'$(CollectionName)' == 'aspnet2'">
294+
<Crank_Partition Include="Partition0" Index="0" />
295+
</ItemGroup>
266296

267-
<ItemGroup Condition="'$(CollectionName)' != 'benchmarks' and '$(CollectionName)' != 'realworld'">
297+
<ItemGroup Condition="'$(CollectionName)' != 'benchmarks' and '$(CollectionName)' != 'realworld' and '$(CollectionName)' != 'aspnet2'">
268298
<HelixWorkItem Include="@(Partition)">
269299
<OutputFileName>$(CollectionName).$(CollectionType).%(HelixWorkItem.PartitionId).$(MchFileTag)</OutputFileName>
270300
<PayloadDirectory>$(AssembliesPayload)$(FileSeparatorChar)%(HelixWorkItem.CollectAssemblies)</PayloadDirectory>
@@ -292,5 +322,15 @@
292322
<Timeout>$(WorkItemTimeout)</Timeout>
293323
<DownloadFilesFromResults>%(OutputFileName).mch;%(OutputFileName).mch.mct;%(OutputFileName).log</DownloadFilesFromResults>
294324
</HelixWorkItem>
295-
</ItemGroup>
325+
</ItemGroup>
326+
327+
<ItemGroup Condition="'$(CollectionName)' == 'aspnet2'">
328+
<HelixWorkItem Include="@(Crank_Partition)">
329+
<OutputFileName>$(CollectionName).$(CollectionType).%(HelixWorkItem.Index).$(MchFileTag)</OutputFileName>
330+
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
331+
<Command>$(WorkItemCommand) --output_mch $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).mch</Command>
332+
<Timeout>$(WorkItemTimeout)</Timeout>
333+
<DownloadFilesFromResults>%(OutputFileName).mch;%(OutputFileName).mch.mct</DownloadFilesFromResults>
334+
</HelixWorkItem>
335+
</ItemGroup>
296336
</Project>

0 commit comments

Comments
 (0)