未验证 提交 6fe49aad 编写于 作者: A Ankit Jain 提交者: GitHub

perf: wasm: Collect helix logs, and artifacts when the build fails (#67248)

* perf: wasm: Collect helix logs, and artifacts when the build fails

This will be helpful in debugging build issues, and random crashes that
we have been seeing on helix.

* Fix misplaced double quote

* perf: Use '--run-isolated' with wasm projects
上级 b675ef67
......@@ -22,6 +22,21 @@ trigger:
variables:
- template: /eng/pipelines/common/variables.yml
- name: _wasmCollectHelixLogsScript
value: >-
test "$_commandExitCode" -eq 0 || (
test -d "$HELIX_WORKITEM_UPLOAD_ROOT" && (
export _PERF_DIR=$HELIX_CORRELATION_PAYLOAD/performance;
mkdir -p $HELIX_WORKITEM_UPLOAD_ROOT/log/MicroBenchmarks/obj;
mkdir -p $HELIX_WORKITEM_UPLOAD_ROOT/log/MicroBenchmarks/bin;
mkdir -p $HELIX_WORKITEM_UPLOAD_ROOT/log/BenchmarkDotNet.Autogenerated/obj;
mkdir -p $HELIX_WORKITEM_UPLOAD_ROOT/log/BenchmarkDotNet.Autogenerated/bin;
find $_PERF_DIR -name '*.binlog' | xargs -I{} cp {} $HELIX_WORKITEM_UPLOAD_ROOT/log;
cp -R $_PERF_DIR/artifacts/obj/MicroBenchmarks $HELIX_WORKITEM_UPLOAD_ROOT/log/MicroBenchmarks/obj;
cp -R $_PERF_DIR/artifacts/bin/MicroBenchmarks $HELIX_WORKITEM_UPLOAD_ROOT/log/MicroBenchmarks/bin;
cp -R $_PERF_DIR/artifacts/obj/BenchmarkDotNet.Autogenerated $HELIX_WORKITEM_UPLOAD_ROOT/log/BenchmarkDotNet.Autogenerated/obj;
cp -R $_PERF_DIR/artifacts/bin/BenchmarkDotNet.Autogenerated $HELIX_WORKITEM_UPLOAD_ROOT/log/BenchmarkDotNet.Autogenerated/bin))
schedules:
- cron: "30 2 * * *"
displayName: Every night at 2:30AM
......@@ -87,6 +102,7 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perftiger'
javascriptEngine: 'javascriptcore'
collectHelixLogsScript: ${{ variables['_wasmCollectHelixLogsScript'] }}
#run mono wasm aot microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
......@@ -107,6 +123,7 @@ jobs:
runjobtemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perftiger'
javascriptengine: 'javascriptcore'
collectHelixLogsScript: ${{ variables['_wasmCollectHelixLogsScript'] }}
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
......@@ -325,6 +342,7 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perftiger'
javascriptEngine: 'v8'
collectHelixLogsScript: ${{ variables['_wasmCollectHelixLogsScript'] }}
#run mono wasm aot microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
......@@ -345,6 +363,7 @@ jobs:
runjobtemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perftiger'
javascriptEngine: 'v8'
collectHelixLogsScript: ${{ variables['_wasmCollectHelixLogsScript'] }}
# run mono aot microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
......
......@@ -20,6 +20,7 @@ parameters:
javascriptEngine: 'NoJS'
iOSLlvmBuild: 'False'
skipLiveLibrariesDownload: false
collectHelixLogsScript: ''
### Perf job
......@@ -55,6 +56,8 @@ jobs:
${{ if and(eq(parameters.runtimeType, 'wasm'), ne(parameters.codeGenType, 'aot')) }}:
helixTypeSuffix: '/wasm'
collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }}
# Test job depends on the corresponding build job
dependsOn:
- ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'wasm')) }}:
......
......@@ -24,6 +24,7 @@ parameters:
logicalMachine: '' # required -- Used to specify a which pool of machines the test should run against
javascriptEngine: 'NoJS'
helixTypeSuffix: '' # optional -- appends to HelixType
collectHelixLogsScript: '' # optional -- script to collect the logs, and artifacts helpful for debugging failures
jobs:
- template: xplat-pipeline-job.yml
......@@ -77,7 +78,7 @@ jobs:
- IsInternal: --internal
- ${{ if ne(parameters.osSubGroup, '_musl') }}:
- HelixPreCommand: $(HelixPreCommandStemLinux);$(ExtraMSBuildLogsLinux)
- HelixPostCommand: 'export PYTHONPATH=$ORIGPYPATH'
- HelixPostCommand: 'export PYTHONPATH=$ORIGPYPATH;${{ parameters.collectHelixLogsScript }}'
- IsInternal: --internal
- group: DotNet-HelixApi-Access
- group: dotnet-benchview
......
......@@ -41,7 +41,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(WasmDotnet)' == 'true'">
<CliArguments>$(CliArguments) --wasm --dotnet-path %24HELIX_CORRELATION_PAYLOAD/dotnet-wasm/dotnet-workload/</CliArguments>
<CliArguments>$(CliArguments) --run-isolated --wasm --dotnet-path %24HELIX_CORRELATION_PAYLOAD/dotnet-wasm/dotnet-workload/</CliArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoDotnet)' == 'true' and '$(AGENT_OS)' == 'Windows_NT'">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册