Welcome to mirror list, hosted at ThFree Co, Russian Federation.

superpmi.proj « scripts « coreclr « src - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 963e117688f5722fc2a20cbe9bef5238adfaa458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">

   <!--
    This is useful for local testing to print the produced helix items
    To use this when you are changing how items are produced, uncomment the target
    and replace the Project item at the top of the file with this:
    <Project DefaultTargets="printItems">

    Once you've done that you can run this to see the results:
    dotnet msbuild .\superpmi.proj /v:n
   -->

   <!-- <PropertyGroup>
     <HelixTargetQueues>Some_Queue</HelixTargetQueues>
     <InputArtifacts>D:\git\runtime\workitem\pmiAssembliesDirectory\libraries</InputArtifacts>
     <MchFileTag>x64.checked</MchFileTag>
     <CollectionName>benchmarks</CollectionName>
     <CollectionType>pmi</CollectionType>
   </PropertyGroup>
  <Target Name="printItems">
        <Message Text="@(HelixWorkItem -> 'name: %(HelixWorkItem.Identity)
     dir: %(HelixWorkItem.PayloadDirectory)
     pre: %(HelixWorkItem.PreCommands)
     command: %(HelixWorkItem.Command)
     post: %(HelixWorkItem.PostCommands)
     timeout: %(HelixWorkItem.Timeout)  '"/>
  </Target> -->

  <PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
    <FileSeparatorChar>\</FileSeparatorChar>
  </PropertyGroup>
  <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
    <FileSeparatorChar>/</FileSeparatorChar>
  </PropertyGroup>

    <!-- The directory structure of pmiAssembliesPayload is
         source\workitem\pmiAssembliesDirectory\<machine_specific_load_0>\binaries
         source\workitem\pmiAssembliesDirectory\<machine_specific_load_1>\binaries
         ...
         source\workitem\pmiAssembliesDirectory\<machine_specific_load_N>\binaries

         PmiAssembliesPayload - Path that will be sent to helix machine to run collection on
         PmiAssembliesDirectory - Path on helix machine itself where superpmi.py will discover the sent assemblies.
    -->
  <PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
    <Python>%HELIX_PYTHONPATH%</Python>
    <PmiAssembliesPayload>$(WorkItemDirectory)\pmiAssembliesDirectory</PmiAssembliesPayload>
    <PmiAssembliesDirectory>%HELIX_WORKITEM_PAYLOAD%\binaries</PmiAssembliesDirectory>
    <SuperPMIDirectory>%HELIX_CORRELATION_PAYLOAD%\superpmi</SuperPMIDirectory>

    <!-- Related to Benchmarks -->
    <PerformanceDirectory>%HELIX_WORKITEM_PAYLOAD%\performance</PerformanceDirectory>

    <OutputMchPath>%HELIX_WORKITEM_UPLOAD_ROOT%</OutputMchPath>
    <!-- Workaround until https://github.com/dotnet/arcade/pull/6179 is not available -->
    <HelixResultsDestinationDir>$(BUILD_SOURCESDIRECTORY)\artifacts\helixresults</HelixResultsDestinationDir>
    <WorkItemCommand>$(SuperPMIDirectory)\superpmi.py collect -log_level DEBUG --$(CollectionType) -pmi_location $(SuperPMIDirectory)\pmi.dll </WorkItemCommand>
  </PropertyGroup>
  <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
    <Python>$HELIX_PYTHONPATH</Python>
    <PmiAssembliesPayload>$(WorkItemDirectory)/pmiAssembliesDirectory</PmiAssembliesPayload>
    <PmiAssembliesDirectory>$HELIX_WORKITEM_PAYLOAD/binaries</PmiAssembliesDirectory>
    <SuperPMIDirectory>$HELIX_CORRELATION_PAYLOAD/superpmi</SuperPMIDirectory>

    <!-- Related to Benchmarks -->
    <PerformanceDirectory>$HELIX_WORKITEM_PAYLOAD/performance</PerformanceDirectory>

    <OutputMchPath>$HELIX_WORKITEM_UPLOAD_ROOT</OutputMchPath>
    <!-- Workaround until https://github.com/dotnet/arcade/pull/6179 is not available -->
    <HelixResultsDestinationDir>$(BUILD_SOURCESDIRECTORY)/artifacts/helixresults</HelixResultsDestinationDir>
    <WorkItemCommand>$(SuperPMIDirectory)/superpmi.py collect -log_level DEBUG --$(CollectionType) -pmi_location $(SuperPMIDirectory)/pmi.dll </WorkItemCommand>
  </PropertyGroup>

  <PropertyGroup Condition="'$(WorkItemCommand)' != ''">
    <WorkItemCommand>$(Python) $(WorkItemCommand) -assemblies $(PmiAssembliesDirectory) -arch $(Architecture) -build_type $(BuildConfig) -core_root $(SuperPMIDirectory)</WorkItemCommand>
  </PropertyGroup>

  <PropertyGroup Condition="'$(CollectionName)' == 'benchmarks'">
    <WorkItemCommand>$(Python) $(SuperPMIDirectory)/superpmi_benchmarks.py -performance_directory $(PerformanceDirectory) -superpmi_directory $(SuperPMIDirectory) -core_root $(SuperPMIDirectory) -arch $(Architecture)</WorkItemCommand>
  </PropertyGroup>

  <PropertyGroup>
    <EnableAzurePipelinesReporter>false</EnableAzurePipelinesReporter>
    <EnableXUnitReporter>false</EnableXUnitReporter>
    <WorkItemTimeout>5:00</WorkItemTimeout>
  </PropertyGroup>

  <ItemGroup Condition=" '$(AGENT_OS)' == 'Windows_NT' ">
    <HelixPreCommand Include="taskkill.exe /f /im corerun.exe"/>
    <HelixPostCommand Include="taskkill.exe /f /im corerun.exe"/>
  </ItemGroup>
  <!-- We're currently not using .dotnet on the Helix agents -->
  <!--
  <ItemGroup Condition=" '$(AGENT_OS)' == 'Windows_NT' ">
    <HelixPreCommand Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\.dotnet%3B%PATH%" Condition=" '$(CollectionType)' == 'crossgen2' "/>
  </ItemGroup>

  <ItemGroup Condition=" '$(AGENT_OS)' != 'Windows_NT' ">
    <HelixPreCommand Include="export PATH=$HELIX_CORRELATION_PAYLOAD/.dotnet:$PATH" Condition=" '$(CollectionType)' == 'crossgen2' "/>
  </ItemGroup>
  -->

  <PropertyGroup>
    <HelixPreCommands>@(HelixPreCommand)</HelixPreCommands>
    <HelixPostCommands>@(HelixPostCommand)</HelixPostCommands>
  </PropertyGroup>

  <ItemGroup>
    <HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
      <PayloadDirectory>%(Identity)</PayloadDirectory>
    </HelixCorrelationPayload>
  </ItemGroup>

  <ItemGroup Condition="'$(CollectionName)' != 'benchmarks'">
    <PartitionDirectories Include="$([System.IO.Directory]::GetDirectories($(InputArtifacts)))"/>
    <Partition Include="@(PartitionDirectories -> '%(Filename)')" PmiAssemblies="%(Filename)" PartitionId="%(Filename)" />
  </ItemGroup>

  <PropertyGroup>
    <PartitionCount>30</PartitionCount>
  </PropertyGroup>
  <ItemGroup>
    <BDN_Partition Include="Partition0" Index="0" />
    <BDN_Partition Include="Partition1" Index="1" />
    <BDN_Partition Include="Partition2" Index="2" />
    <BDN_Partition Include="Partition3" Index="3" />
    <BDN_Partition Include="Partition4" Index="4" />
    <BDN_Partition Include="Partition5" Index="5" />
    <BDN_Partition Include="Partition6" Index="6" />
    <BDN_Partition Include="Partition7" Index="7" />
    <BDN_Partition Include="Partition8" Index="8" />
    <BDN_Partition Include="Partition9" Index="9" />
    <BDN_Partition Include="Partition10" Index="10" />
    <BDN_Partition Include="Partition11" Index="11" />
    <BDN_Partition Include="Partition12" Index="12" />
    <BDN_Partition Include="Partition13" Index="13" />
    <BDN_Partition Include="Partition14" Index="14" />
    <BDN_Partition Include="Partition15" Index="15" />
    <BDN_Partition Include="Partition16" Index="16" />
    <BDN_Partition Include="Partition17" Index="17" />
    <BDN_Partition Include="Partition18" Index="18" />
    <BDN_Partition Include="Partition19" Index="19" />
    <BDN_Partition Include="Partition20" Index="20" />
    <BDN_Partition Include="Partition21" Index="21" />
    <BDN_Partition Include="Partition22" Index="22" />
    <BDN_Partition Include="Partition23" Index="23" />
    <BDN_Partition Include="Partition24" Index="24" />
    <BDN_Partition Include="Partition25" Index="25" />
    <BDN_Partition Include="Partition26" Index="26" />
    <BDN_Partition Include="Partition27" Index="27" />
    <BDN_Partition Include="Partition28" Index="28" />
    <BDN_Partition Include="Partition29" Index="29" />
  </ItemGroup>

  <ItemGroup Condition="'$(CollectionName)' != 'benchmarks'">
    <HelixWorkItem Include="@(Partition)">
      <OutputFileName>$(CollectionName).$(CollectionType).%(HelixWorkItem.PartitionId).$(MchFileTag)</OutputFileName>
      <PayloadDirectory>$(PmiAssembliesPayload)$(FileSeparatorChar)$(CollectionName)$(FileSeparatorChar)%(HelixWorkItem.PmiAssemblies)</PayloadDirectory>
      <Command>$(WorkItemCommand) -output_mch_path $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).mch -log_file $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).log</Command>
      <Timeout>$(WorkItemTimeout)</Timeout>
      <DownloadFilesFromResults>%(OutputFileName).mch;%(OutputFileName).mch.mct;%(OutputFileName).log</DownloadFilesFromResults>
    </HelixWorkItem>
  </ItemGroup>

  <ItemGroup Condition="'$(CollectionName)' == 'benchmarks'">
    <HelixWorkItem Include="@(BDN_Partition)">
      <OutputFileName>$(CollectionName).$(CollectionType).%(HelixWorkItem.Index).$(MchFileTag)</OutputFileName>
      <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
      <Command>$(WorkItemCommand) -partition_count $(PartitionCount) -partition_index %(HelixWorkItem.Index) -output_mch_path $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).mch -log_file $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).log</Command>
      <Timeout>$(WorkItemTimeout)</Timeout>
      <DownloadFilesFromResults>%(OutputFileName).mch;%(OutputFileName).mch.mct;%(OutputFileName).log</DownloadFilesFromResults>
    </HelixWorkItem>
  </ItemGroup>
</Project>