Skip to content
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
15 changes: 13 additions & 2 deletions eng/ci/host.benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ schedules:
- dev
always: true

parameters:

# Crank arguments customization.
- name: crankAdditionalArguments
displayName: Additional Crank arguments. For collecting perf trace, add --hostruntime.dotnetTrace true
type: string
default: '--variable duration=180 --variable warmup=60'

resources:
repositories:
- repository: 1es
Expand Down Expand Up @@ -54,11 +62,10 @@ extends:
- template: /eng/ci/templates/official/jobs/setup-benchmark-agents.yml@self
parameters:
functionAppName: HelloHttpNet9NoProxy

# LINUX
- template: /eng/ci/templates/official/jobs/setup-benchmark-agents.yml@self
parameters:
functionAppName: HelloHttpNet9
functionAppName: HelloHttpNet9
os: Linux
- template: /eng/ci/templates/official/jobs/setup-benchmark-agents.yml@self
parameters:
Expand All @@ -74,19 +81,23 @@ extends:
parameters:
description: .NET9 Web Application
functionAppName: HelloHttpNet9 # App with ASP.NET Integration
crankAdditionalArguments: ${{ parameters.crankAdditionalArguments }}
- template: /eng/ci/templates/official/jobs/run-benchmarks.yml@self
parameters:
description: .NET9 Worker Application
functionAppName: HelloHttpNet9NoProxy # App without ASP.NET Integration
crankAdditionalArguments: ${{ parameters.crankAdditionalArguments }}

# LINUX
- template: /eng/ci/templates/official/jobs/run-benchmarks.yml@self
parameters:
description: .NET9 Web Application
functionAppName: HelloHttpNet9
os: Linux
crankAdditionalArguments: ${{ parameters.crankAdditionalArguments }}
- template: /eng/ci/templates/official/jobs/run-benchmarks.yml@self
parameters:
description: .NET9 Worker Application
functionAppName: HelloHttpNet9NoProxy
os: Linux
crankAdditionalArguments: ${{ parameters.crankAdditionalArguments }}
24 changes: 17 additions & 7 deletions eng/ci/templates/official/jobs/run-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ parameters:
values:
- Windows
- Linux
- name: crankAdditionalArguments
type: string

jobs:
- job: ${{ parameters.functionAppName }}_${{ parameters.os }}
Expand All @@ -30,13 +32,15 @@ jobs:
functionApp: ${{ parameters.functionAppName }}
benchmarkArtifactName: benchmark_results_$(Agent.OS)_$(functionApp)
functionAppOutputPath: $(Build.ArtifactStagingDirectory)/FunctionApps/$(functionApp)
benchmarkResultsJsonPath: $(Build.ArtifactStagingDirectory)/BenchmarkResults/$(Build.BuildNumber)_$(functionApp).json
traceDirectory: $(Build.ArtifactStagingDirectory)/out
benchmarkResultsJsonPath: $(traceDirectory)/BenchmarkResults/$(Build.BuildNumber)_$(functionApp).json
functionsWorkerRuntime: 'dotnet-isolated'
configFilePath: "./eng/perf/http.benchmarks.yml"
hostLocation: "./../../"
baselineBenchmarkResultFilePath: ''
baselineBenchmarkResultsDownloadDir: $(Pipeline.Workspace)/BenchmarkBaselineResult
appAgentHostName: ''
crankExtraArguments: ${{ parameters.crankAdditionalArguments }}

templateContext:
inputs:
Expand All @@ -45,12 +49,13 @@ jobs:
pipeline: BaselineResult
targetPath: $(baselineBenchmarkResultsDownloadDir)

outputParentDirectory: $(Build.ArtifactStagingDirectory)
outputParentDirectory: $(traceDirectory)
outputs:
- output: pipelineArtifact
displayName: Publish benchmark results
path: $(benchmarkResultsJsonPath)
artifact: $(benchmarkArtifactName)
- output: pipelineArtifact
displayName: Publish artifacts
path: $(traceDirectory)
artifact: AzFunc_$(Build.BuildNumber)_${{ parameters.os }}_${{ parameters.functionAppName }}
condition: always()

steps:

Expand All @@ -62,6 +67,10 @@ jobs:
- script: dotnet tool install -g Microsoft.Crank.Controller --version "0.2.0-*"
displayName: Install Microsoft.Crank.Controller tool

- pwsh: |
New-Item -ItemType Directory -Path $(traceDirectory)
displayName: Create artifact directories

- ${{ if eq(parameters.os, 'Windows') }}:
- pwsh: Start-Process powershell -ArgumentList '-NoExit', '-Command', 'crank-agent'
displayName: Start crank-agent
Expand Down Expand Up @@ -112,8 +121,9 @@ jobs:
scriptLocation: inlineScript
inlineScript: |
$crankArgs = "--config $(configFilePath) --scenario hellohttp --profile win2022 --load.options.reuseBuild true --description `"$(runDescription)`" --command-line-property --no-measurements --json $(benchmarkResultsJsonPath) --property sourceVersion=$(Build.SourceVersion) --property buildNumber=$(Build.BuildNumber) --property buildId=$(Build.BuildId) --property sourceBranch=$(Build.SourceBranch) --variable FunctionsWorkerRuntime=$(functionsWorkerRuntime) --variable HostLocation=$(hostLocation) --variable FunctionAppPath=$(functionAppOutputPath)"
$crankArgs += " --hostruntime.options.traceOutput $(traceDirectory)/$(Build.BuildNumber)_$(functionApp)_$(Agent.OS)"
$crankArgs += " --variable CrankAgentAppVm=$(appAgentHostName) --variable CrankAgentLoadVm=localhost --variable AspNetUrls=http://$(appAgentHostName):5000"
$crankArgs += " $(AdditionalCrankArguments)"
$crankArgs += " $(crankExtraArguments)"
$command = "crank $crankArgs"
if ('$(storeBenchmarkResultsInDatabase)' -eq 'true') {
$command += " --table HttpBenchmarks --sql `"$(BenchmarkResultsSqlConnectionString)`""
Expand Down
2 changes: 1 addition & 1 deletion eng/ci/templates/official/jobs/run-coldstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
displayName: Publish Trace artifacts
path: $(traceDirectory)
artifact: AzFunc_${{ parameters.os }}_${{ parameters.functionAppName }}
condition:: always()
condition: always()

steps:

Expand Down