05e5f098915b47753b8d68d1146778fd1c325b27
[platform/upstream/coreclr.git] / eng / common / performance / perfhelixpublish.proj
1 <Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
2
3   <PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
4     <WorkItemCommand>%HELIX_CORRELATION_PAYLOAD%\performance\scripts\benchmarks_ci.py --csproj %HELIX_CORRELATION_PAYLOAD%\performance\$(TargetCsproj)</WorkItemCommand>
5     <CliArguments>--dotnet-versions %DOTNET_VERSION% --cli-source-info args --cli-branch %PERFLAB_BRANCH% --cli-commit-sha %PERFLAB_HASH% --cli-repository https://github.com/%PERFLAB_REPO% --cli-source-timestamp %PERFLAB_BUILDTIMESTAMP%</CliArguments>
6     <Python>py -3</Python>
7     <CoreRun>%HELIX_CORRELATION_PAYLOAD%\Core_Root\CoreRun.exe</CoreRun>
8     <HelixPreCommands>$(HelixPreCommands);call %HELIX_CORRELATION_PAYLOAD%\performance\tools\machine-setup.cmd</HelixPreCommands>
9     <ArtifactsDirectory>%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts</ArtifactsDirectory>
10   </PropertyGroup>
11
12   <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT' and '$(RunFromPerfRepo)' == 'false'">
13     <BaseDirectory>$HELIX_CORRELATION_PAYLOAD</BaseDirectory>
14     <PerformanceDirectory>$(BaseDirectory)/performance</PerformanceDirectory>
15   </PropertyGroup>
16
17   <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT' and '$(RunFromPerfRepo)' == 'true'">
18     <BaseDirectory>$HELIX_WORKITEM_PAYLOAD</BaseDirectory>
19     <PerformanceDirectory>$(BaseDirectory)</PerformanceDirectory>
20   </PropertyGroup>
21
22   <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
23     <WorkItemCommand>$(PerformanceDirectory)/scripts/benchmarks_ci.py --csproj $(PerformanceDirectory)/$(TargetCsproj)</WorkItemCommand>
24     <CliArguments>--dotnet-versions $DOTNET_VERSION --cli-source-info args --cli-branch $PERFLAB_BRANCH --cli-commit-sha $PERFLAB_HASH --cli-repository https://github.com/$PERFLAB_REPO --cli-source-timestamp $PERFLAB_BUILDTIMESTAMP</CliArguments>
25     <Python>python3</Python>
26     <CoreRun>$(BaseDirectory)/Core_Root/corerun</CoreRun>
27     <HelixPreCommands>$(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh</HelixPreCommands>
28     <ArtifactsDirectory>$(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts</ArtifactsDirectory>
29   </PropertyGroup>
30
31   <PropertyGroup Condition="'$(UseCoreRun)' == 'true'">
32     <CoreRunArgument>--corerun $(CoreRun)</CoreRunArgument>
33   </PropertyGroup>
34
35   <PropertyGroup Condition="'$(WorkItemCommand)' != ''">
36     <WorkItemCommand>$(Python) $(WorkItemCommand) --incremental no --architecture $(Architecture) -f $(_Framework) $(PerfLabArguments)</WorkItemCommand>
37   </PropertyGroup>
38
39   <PropertyGroup Condition="'$(_Framework)' != 'net461'">
40     <WorkItemCommand>$(WorkItemCommand) $(CliArguments)</WorkItemCommand>
41   </PropertyGroup>
42
43   <ItemGroup>
44     <HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
45       <PayloadDirectory>%(Identity)</PayloadDirectory>
46     </HelixCorrelationPayload>
47   </ItemGroup>
48
49   <PropertyGroup>
50     <PartitionCount>5</PartitionCount>
51   </PropertyGroup>
52   <ItemGroup>
53     <Partition Include="$(BuildConfig).Partition0" Index="0" />
54     <Partition Include="$(BuildConfig).Partition1" Index="1" />
55     <Partition Include="$(BuildConfig).Partition2" Index="2" />
56     <Partition Include="$(BuildConfig).Partition3" Index="3" />
57     <Partition Include="$(BuildConfig).Partition4" Index="4" />
58   </ItemGroup>
59
60   <!-- 
61     Partition the Microbenchmarks project, but nothing else
62   -->
63   <ItemGroup Condition="$(TargetCsproj.Contains('MicroBenchmarks.csproj'))">
64     <HelixWorkItem Include="@(Partition)">
65       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
66       <Command>$(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</Command>
67       <Timeout>4:00</Timeout>
68     </HelixWorkItem>
69   </ItemGroup>
70   <ItemGroup Condition="!$(TargetCsproj.Contains('MicroBenchmarks.csproj'))">
71     <HelixWorkItem Include="$(BuildConfig).WorkItem">
72       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
73       <Command>$(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory)"</Command>
74       <Timeout>4:00</Timeout>
75     </HelixWorkItem>
76   </ItemGroup>
77 </Project>