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

runtime-wasm-perf: add support for running against forks, and branches #73105

Merged
merged 1 commit into from
Aug 5, 2022
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
6 changes: 6 additions & 0 deletions eng/pipelines/coreclr/perf-wasm-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parameters:
onlySanityCheck: false
downloadSpecificBuild: null # { buildId, pipeline, branchName, project }
collectHelixLogsScript: ''
perfForkToUse: {} # url, branch

jobs:

Expand Down Expand Up @@ -48,6 +49,7 @@ jobs:
javascriptEngine: 'javascriptcore'
collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }}
downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }}
perfForkToUse: ${{ parameters.perfForkToUse }}
#downloadSpecificBuild:
#buildId: '1693181'
#pipeline: 'perf-wasm'
Expand All @@ -74,6 +76,7 @@ jobs:
javascriptengine: 'javascriptcore'
collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }}
downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }}
perfForkToUse: ${{ parameters.perfForkToUse }}

- ${{ if eq(parameters.runProfile, 'v8') }}:
- ${{ if eq(parameters.downloadSpecificBuild.buildId, '') }}:
Expand Down Expand Up @@ -116,6 +119,7 @@ jobs:
compare: ${{ parameters.compare }}
onlySanityCheck: ${{ parameters.onlySanityCheck }}
downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }}
perfForkToUse: ${{ parameters.perfForkToUse }}

#run mono wasm aot microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
Expand All @@ -140,6 +144,7 @@ jobs:
compare: ${{ parameters.compare }}
onlySanityCheck: ${{ parameters.onlySanityCheck }}
downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }}
perfForkToUse: ${{ parameters.perfForkToUse }}

# run mono wasm blazor perf job
- template: /eng/pipelines/common/platform-matrix.yml
Expand All @@ -160,3 +165,4 @@ jobs:
#additionalSetupParameters: '--latestdotnet' - doesn't do anything, IIUC. see performance-setup.sh
logicalmachine: 'perftiger'
downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }}
perfForkToUse: ${{ parameters.perfForkToUse }}
11 changes: 10 additions & 1 deletion eng/pipelines/coreclr/templates/perf-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ parameters:
compare: false
onlySanityCheck: false
downloadSpecificBuild: null # buildId, pipeline, branchName, project
perfForkToUse: {} # url, branch

### Perf job

Expand Down Expand Up @@ -114,11 +115,19 @@ jobs:
- ${{ each variable in parameters.variables }}:
- name: ${{ variable.name }}
value: ${{ variable.value }}
- name: extraSetupParametersSuffix

- name: _compareArg
${{ if eq(parameters.compare, 'true') }}:
value: '--compare'
- name: _onlySanityCheckArg
${{ if eq(parameters.onlySanityCheck, 'true') }}:
value: '--only-sanity'
- name: _perfForkArg
${{ if ne(parameters.perfForkToUse.url, '') }}:
value: --perffork ${{ parameters.perfForkToUse.url }} --perfforkbranch ${{ coalesce(parameters.perfForkToUse.branch, 'main') }}

- name: extraSetupParametersSuffix
value: "$(_compareArg) $(_onlySanityCheckArg) $(_perfForkArg)"

frameworks:
- ${{ parameters.framework }}
Expand Down
5 changes: 4 additions & 1 deletion eng/pipelines/runtime-wasm-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ jobs:
parameters:
runProfile: 'v8'
collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }}
#onlySanityCheck: false
onlySanityCheck: true
#perfForkToUse:
#url: https://github.com/radical/performance
#branch: fix-build
#downloadSpecificBuild:
#buildId: '1878694'
#pipeline: 'perf-wasm'
Expand Down
2 changes: 1 addition & 1 deletion eng/testing/performance/microbenchmarks.proj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

<PropertyGroup>
<WorkItemTimeout>2:30</WorkItemTimeout>
<WorkItemTimeout Condition="'$(OnlySanityCheck)' == 'true'">0:15</WorkItemTimeout>
<WorkItemTimeout Condition="'$(OnlySanityCheck)' == 'true'">1:30</WorkItemTimeout>
</PropertyGroup>

<ItemGroup>
Expand Down
16 changes: 15 additions & 1 deletion eng/testing/performance/performance-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ monoaot_path=
run_categories="Libraries Runtime"
csproj="src\benchmarks\micro\MicroBenchmarks.csproj"
configurations="CompliationMode=$compilation_mode RunKind=$kind"
perf_fork=""
perf_fork_branch="main"
run_from_perf_repo=false
use_core_run=true
use_baseline_core_run=true
Expand Down Expand Up @@ -158,6 +160,14 @@ while (($# > 0)); do
maui_version=$2
shift 2
;;
--perffork)
perf_fork=$2
shift 2
;;
--perfforkbranch)
perf_fork_branch=$2
shift 2
;;
--only-sanity)
only_sanity=true
shift 1
Expand Down Expand Up @@ -306,7 +316,11 @@ if [[ "$run_from_perf_repo" == true ]]; then
performance_directory=$workitem_directory
setup_arguments="--perf-hash $commit_sha $common_setup_arguments"
else
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $performance_directory
if [[ -n "$perf_fork" ]]; then
git clone --branch $perf_fork_branch --depth 1 --quiet $perf_fork $performance_directory
else
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $performance_directory
fi
# uncomment to use BenchmarkDotNet sources instead of nuget packages
# git clone https://github.com/dotnet/BenchmarkDotNet.git $benchmark_directory

Expand Down