Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Move microbenchmarks, and blazor SOD runs to net8.0 #80308

Merged
merged 3 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions eng/pipelines/common/perf-variables.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
variables:
- name: _wasmCollectHelixLogsScript
value: >-
test "$_commandExitCode" -eq 0 || (
test -d "$HELIX_WORKITEM_UPLOAD_ROOT" && (
export _PERF_DIR=$HELIX_WORKITEM_ROOT/performance;
test -d "$HELIX_WORKITEM_UPLOAD_ROOT" && (
export _PERF_DIR=$HELIX_WORKITEM_ROOT/performance;
mkdir -p $HELIX_WORKITEM_UPLOAD_ROOT/log;
find $_PERF_DIR -name '*.binlog' | xargs -I{} cp {} $HELIX_WORKITEM_UPLOAD_ROOT/log;
test "$_commandExitCode" -eq 0 || (
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/for-running;
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;
Expand Down
9 changes: 6 additions & 3 deletions eng/pipelines/coreclr/perf-wasm-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perftiger'
javascriptEngine: 'v8'
additionalSetupParameters: '--dotnet-versions 8.0.0' # passed to ci_setup.py
# passed to ci_setup.py to work with 8.0 sdk when using tfm!=net8.0
#additionalSetupParameters: '--dotnet-versions 8.0.0'
collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }}
compare: ${{ parameters.compare }}
onlySanityCheck: ${{ parameters.onlySanityCheck }}
Expand All @@ -141,7 +142,8 @@ jobs:
runjobtemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perftiger'
javascriptEngine: 'v8'
additionalSetupParameters: '--dotnet-versions 8.0.0' # passed to ci_setup.py
# passed to ci_setup.py to work with 8.0 sdk when using tfm!=net8.0
#additionalSetupParameters: '--dotnet-versions 8.0.0' # passed to ci_setup.py
collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }}
compare: ${{ parameters.compare }}
onlySanityCheck: ${{ parameters.onlySanityCheck }}
Expand All @@ -164,7 +166,8 @@ jobs:
projectFile: blazor_perf.proj
runKind: blazor_scenarios
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
additionalSetupParameters: '--dotnetversions 8.0.0' # passed to performance-setup.sh
# passed to ci_setup.py to work with 8.0 sdk when using tfm!=net8.0
# additionalSetupParameters: '--dotnetversions 8.0.0' # passed to performance-setup.sh
logicalmachine: 'perftiger'
downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }}
perfForkToUse: ${{ parameters.perfForkToUse }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ steps:
/p:Configuration=${{ parameters.configForBuild }}
/p:ContinuousIntegrationBuild=true
/t:InstallWorkloadUsingArtifacts
/bl:$(Build.SourcesDirectory)/artifacts/log/${{ parameters.configForBuild }}/InstallWorkloadUsingArtifacts.binlog
$(Build.SourcesDirectory)/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj
displayName: "Install workload using artifacts"

- script: >-
mkdir -p $(Build.SourcesDirectory)/artifacts/staging &&
cp -r $(Build.SourcesDirectory)/artifacts/bin/dotnet-net7+latest $(Build.SourcesDirectory)/artifacts/staging &&
cp -r $(Build.SourcesDirectory)/artifacts/bin/dotnet-latest $(Build.SourcesDirectory)/artifacts/staging &&
cp -r $(Build.SourcesDirectory)/artifacts/bin/microsoft.netcore.app.runtime.browser-wasm $(Build.SourcesDirectory)/artifacts/staging &&
cp -r $(Build.SourcesDirectory)/artifacts/bin/microsoft.netcore.app.ref $(Build.SourcesDirectory)/artifacts/staging
displayName: "Prepare artifacts staging directory"
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/coreclr/templates/perf-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ jobs:
- script: >-
mkdir -p $(librariesDownloadDir)/bin/wasm/wasm-data &&
mkdir -p $(librariesDownloadDir)/bin/wasm/dotnet &&
cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-net7+latest/* $(librariesDownloadDir)/bin/wasm/dotnet &&
cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-latest/* $(librariesDownloadDir)/bin/wasm/dotnet &&
cp src/mono/wasm/Wasm.Build.Tests/data/test-main-7.0.js $(librariesDownloadDir)/bin/wasm/wasm-data/test-main.js &&
find $(librariesDownloadDir)/bin/wasm -type d &&
find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \;
Expand Down
6 changes: 3 additions & 3 deletions eng/pipelines/coreclr/templates/run-performance-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ jobs:
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - &&
sudo apt-get -y install nodejs &&
npm install --prefix $HELIX_WORKITEM_PAYLOAD jsvu -g &&
$HELIX_WORKITEM_PAYLOAD/bin/jsvu --os=linux64 v8@11.0.162 &&
rm -f ~/.jsvu/v8 &&
ln -s ~/.jsvu/v8-11.0.162 ~/.jsvu/v8
$HELIX_WORKITEM_PAYLOAD/bin/jsvu --os=linux64 --engines=v8 &&
find ~/.jsvu -ls &&
~/.jsvu/v8 -e "console.log(`V8 version: ${this.version()}`)"
- ${{ if ne(parameters.runtimeType, 'wasm') }}:
- HelixPreCommandsWasmOnLinux: echo
- HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/coreclr/templates/run-scenarios-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
# Using test-main-7.0.js, since we are building with tfm:net7.0
- script: >-
mkdir -p $(librariesDownloadDir)/bin/wasm/data &&
cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-net7+latest $(librariesDownloadDir)/bin/wasm &&
cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-latest $(librariesDownloadDir)/bin/wasm &&
cp src/mono/wasm/Wasm.Build.Tests/data/test-main-7.0.js $(librariesDownloadDir)/bin/wasm/data/test-main.js &&
find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \;
displayName: "Create wasm directory (Linux)"
Expand Down
31 changes: 18 additions & 13 deletions eng/testing/performance/blazor_perf.proj
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
<PropertyGroup>
<LogDirectory Condition="'$(AGENT_OS)' == 'Windows_NT'">%HELIX_WORKITEM_UPLOAD_ROOT%\</LogDirectory>
<LogDirectory Condition="'$(AGENT_OS)' != 'Windows_NT'">%24{HELIX_WORKITEM_UPLOAD_ROOT}/</LogDirectory>

<Python>python3</Python>
<HelixPreCommands>$(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/SOD/SizeOnDisk</HelixPreCommands>
<HelixPreCommands Condition="'$(AGENT_OS)' != 'Windows_NT'">$(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/SOD/SizeOnDisk</HelixPreCommands>

<PublishArgs>--has-workload --readonly-dotnet --msbuild "/p:_TrimmerDumpDependencies=true" --msbuild-static AdditionalMonoLinkerOptions=%27&quot;%24(AdditionalMonoLinkerOptions) --dump-dependencies&quot;%27</PublishArgs>
<PublishArgs>--has-workload --readonly-dotnet --msbuild "/p:_TrimmerDumpDependencies=true" --msbuild /warnaserror:NU1602,NU1604 --msbuild-static AdditionalMonoLinkerOptions=%27&quot;%24(AdditionalMonoLinkerOptions) --dump-dependencies&quot;%27 --binlog $(LogDirectory)blazor_publish.binlog</PublishArgs>
<PublishCommand>$(Python) pre.py publish $(PublishArgs)</PublishCommand>
</PropertyGroup>

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

<PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
<ScenarioDirectory>%HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\</ScenarioDirectory>
<BlazorMinDirectory>$(ScenarioDirectory)blazorminapp\</BlazorMinDirectory>
Expand All @@ -36,6 +33,12 @@
<PerflabTargetFrameworks>$PERFLAB_TARGET_FRAMEWORKS</PerflabTargetFrameworks>
</PropertyGroup>

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

<ItemGroup>
<HelixWorkItem Include="SOD - Minimum Blazor Template - Publish">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
Expand All @@ -46,27 +49,29 @@
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<!-- Specifying both linker dump msbuild properties in case linker version is not updated -->
<Command>cd $(BlazorMinAOTDirectory) &amp;&amp; $(PublishCommand) &amp;&amp; $(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<Timeout>00:30</Timeout>
</HelixWorkItem>
<HelixWorkItem Include="SOD - New Blazor Template - Publish">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<Command>cd $(BlazorDirectory) &amp;&amp; $(PublishCommand) --binlog %27./traces/blazor_publish.binlog%27 &amp;&amp; $(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<Command>cd $(BlazorDirectory) &amp;&amp; $(PublishCommand) &amp;&amp; $(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py --readonly-dotnet</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="SOD - New Blazor Template - Publish - AOT">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<Command>cd $(BlazorAOTDirectory) &amp;&amp; $(PublishCommand) --binlog %27./traces/blazor_publish.binlog%27 &amp;&amp; $(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<Command>cd $(BlazorAOTDirectory) &amp;&amp; $(PublishCommand) &amp;&amp; $(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py --readonly-dotnet</PostCommands>
<Timeout>00:30</Timeout>
</HelixWorkItem>
<HelixWorkItem Include="SOD - Pizza App - Publish">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<!-- Specifying both linker dump msbuild properties in case linker version is not updated -->
<Command>cd $(BlazorPizzaDirectory) &amp;&amp; $(PublishCommand) -f $(PerflabTargetFrameworks) --binlog %27./traces/blazor_publish.binlog%27 &amp;&amp; $(Python) test.py sod --scenario-name &quot;%(Identity)&quot; --dirs $(PizzaAppPubLocation)</Command>
<Command>cd $(BlazorPizzaDirectory) &amp;&amp; $(PublishCommand) -f $(PerflabTargetFrameworks) &amp;&amp; $(Python) test.py sod --scenario-name &quot;%(Identity)&quot; --dirs $(PizzaAppPubLocation)</Command>
<PostCommands>$(Python) post.py --readonly-dotnet</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="SOD - Pizza App - Publish - AOT">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<!-- Specifying both linker dump msbuild properties in case linker version is not updated -->
<Command>cd $(BlazorPizzaAOTDirectory) &amp;&amp; $(PublishCommand) -f $(PerflabTargetFrameworks) --binlog %27./traces/blazor_publish.binlog%27 &amp;&amp; $(Python) test.py sod --scenario-name &quot;%(Identity)&quot; --dirs $(PizzaAppPubLocation)</Command>
<Command>cd $(BlazorPizzaAOTDirectory) &amp;&amp; $(PublishCommand) -f $(PerflabTargetFrameworks) &amp;&amp; $(Python) test.py sod --scenario-name &quot;%(Identity)&quot; --dirs $(PizzaAppPubLocation)</Command>
<PostCommands>$(Python) post.py --readonly-dotnet</PostCommands>
<Timeout>1:00</Timeout>
</HelixWorkItem>
Expand Down
2 changes: 2 additions & 0 deletions eng/testing/performance/performance-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ else
# uncomment to use BenchmarkDotNet sources instead of nuget packages
# git clone https://github.com/dotnet/BenchmarkDotNet.git $benchmark_directory

(cd $performance_directory; git show -s HEAD)

docs_directory=$performance_directory/docs
mv $docs_directory $workitem_directory
fi
Expand Down