-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[perf] Add pipeline template and storage pipelines (#24894)
- Loading branch information
1 parent
88055b3
commit 4899065
Showing
7 changed files
with
288 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
parameters: | ||
- name: serviceDirectory | ||
type: string | ||
default: '' | ||
- name: services | ||
type: string | ||
default: '' | ||
- name: packageVersions | ||
type: string | ||
default: '.*' | ||
- name: tests | ||
type: string | ||
default: '' | ||
- name: arguments | ||
type: string | ||
default: '' | ||
- name: iterations | ||
type: number | ||
default: '5' | ||
- name: envVars | ||
type: object | ||
default: {} | ||
- name: additionalArguments | ||
type: string | ||
default: '' | ||
|
||
variables: | ||
- template: /eng/pipelines/templates/variables/globals.yml | ||
- name: Pool | ||
value: 'azsdk-pool-mms-ubuntu-2004-perf' | ||
- name: OSVmImage | ||
value: 'MMSUbuntu20.04' | ||
- name: PythonVersion | ||
value: '3.7' | ||
|
||
resources: | ||
repositories: | ||
- repository: azure-sdk-tools | ||
type: github | ||
endpoint: Azure | ||
name: Azure/azure-sdk-tools | ||
|
||
jobs: | ||
- job: Perf | ||
timeoutInMinutes: 360 | ||
pool: | ||
name: $(Pool) | ||
vmImage: $(OSVmImage) | ||
steps: | ||
- checkout: self | ||
path: s | ||
|
||
- checkout: azure-sdk-tools | ||
path: s/azure-sdk-tools | ||
|
||
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml | ||
parameters: | ||
AgentImage: $(OSVmImage) | ||
|
||
- task: UsePythonVersion@0 | ||
displayName: "Use Python $(PythonVersion)" | ||
inputs: | ||
versionSpec: $(PythonVersion) | ||
|
||
- template: /eng/common/TestResources/deploy-test-resources.yml | ||
parameters: | ||
ServiceDirectory: ${{ parameters.serviceDirectory }} | ||
Location: westus | ||
ResourceType: perf | ||
|
||
- pwsh: | | ||
set-content -path config.yml -value "WorkingDirectories:" | ||
add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/s" | ||
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation | ||
displayName: Create config.yml | ||
- script: >- | ||
dotnet run -- run | ||
--no-sync | ||
--languages python | ||
--services "${{ parameters.services }}" | ||
--package-versions "${{ parameters.packageVersions }}" | ||
--tests "${{ parameters.tests }}" | ||
--arguments "${{ parameters.arguments }}" | ||
--iterations ${{ parameters.iterations }} | ||
${{ parameters.additionalArguments }} | ||
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation | ||
env: | ||
${{ each var in parameters.EnvVars }}: | ||
${{ var.key }}: ${{ var.value }} | ||
displayName: Run perf tests | ||
- pwsh: | | ||
get-content results.csv | ||
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results | ||
displayName: Print results.csv | ||
- pwsh: | | ||
get-content results.json | ||
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results | ||
displayName: Print results.json | ||
- template: /eng/common/TestResources/remove-test-resources.yml | ||
parameters: | ||
ServiceDirectory: ${{ parameters.serviceDirectory }} | ||
ResourceType: perf | ||
|
||
- task: PublishPipelineArtifact@1 | ||
inputs: | ||
targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results | ||
artifactName: results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
param baseName string = resourceGroup().name | ||
param location string = resourceGroup().location | ||
|
||
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = { | ||
name: '${baseName}blob' | ||
location: location | ||
kind: 'BlockBlobStorage' | ||
sku: { | ||
name: 'Premium_LRS' | ||
} | ||
} | ||
|
||
var name = storageAccount.name | ||
var key = storageAccount.listKeys().keys[0].value | ||
var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key}' | ||
|
||
output AZURE_STORAGE_ACCOUNT_NAME string = name | ||
output AZURE_STORAGE_ACCOUNT_KEY string = key | ||
output AZURE_STORAGE_CONNECTION_STRING string = connectionString | ||
output STANDARD_STORAGE_CONNECTION_STRING string = connectionString | ||
output STORAGE_CONNECTION_STRING string = connectionString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
parameters: | ||
- name: packageVersions | ||
displayName: PackageVersions (regex of package versions to run) | ||
type: string | ||
default: '12|source' | ||
- name: tests | ||
displayName: Tests (regex of tests to run) | ||
type: string | ||
default: '^(download|upload|list-blobs)$' | ||
- name: arguments | ||
displayName: Arguments (regex of arguments to run) | ||
type: string | ||
default: '(10240)|(10485760)|(1073741824)|(5 )|(500 )|(50000 )' | ||
- name: iterations | ||
displayName: Iterations (times to run each test) | ||
type: number | ||
default: '5' | ||
- name: additionalArguments | ||
displayName: AdditionalArguments (passed to PerfAutomation) | ||
type: string | ||
default: ' ' | ||
|
||
extends: | ||
template: /eng/pipelines/templates/jobs/perf.yml | ||
parameters: | ||
serviceDirectory: storage/azure-storage-blob | ||
services: "^storage-blob$" | ||
packageVersions: ${{ parameters.packageVersions }} | ||
tests: ${{ parameters.tests }} | ||
arguments: ${{ parameters.arguments }} | ||
iterations: ${{ parameters.iterations }} | ||
additionalArguments: ${{ parameters.additionalArguments }} |
30 changes: 30 additions & 0 deletions
30
sdk/storage/azure-storage-file-datalake/perf-resources.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
param baseName string = resourceGroup().name | ||
param location string = resourceGroup().location | ||
|
||
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = { | ||
name: '${baseName}dlake' | ||
location: location | ||
kind: 'BlockBlobStorage' | ||
sku: { | ||
name: 'Premium_LRS' | ||
} | ||
properties: { | ||
isHnsEnabled: true | ||
} | ||
} | ||
|
||
var name = storageAccount.name | ||
var key = storageAccount.listKeys().keys[0].value | ||
|
||
// EndpointSuffix is required by azure-storage-file-datalake 12.7.0 and earlier (fixed in #24779) | ||
var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key};EndpointSuffix=core.windows.net' | ||
|
||
// .NET | ||
output DATALAKE_STORAGE_ACCOUNT_NAME string = name | ||
output DATALAKE_STORAGE_ACCOUNT_KEY string = key | ||
|
||
// Java, JS | ||
output STORAGE_CONNECTION_STRING string = connectionString | ||
|
||
// Python | ||
output AZURE_STORAGE_CONNECTION_STRING string = connectionString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
parameters: | ||
- name: packageVersions | ||
displayName: PackageVersions (regex of package versions to run) | ||
type: string | ||
default: '12|source' | ||
- name: tests | ||
displayName: Tests (regex of tests to run) | ||
type: string | ||
default: '^(download|upload)$' | ||
- name: arguments | ||
displayName: Arguments (regex of arguments to run) | ||
type: string | ||
default: '(10240)|(10485760)|(1073741824)' | ||
- name: iterations | ||
displayName: Iterations (times to run each test) | ||
type: number | ||
default: '5' | ||
- name: additionalArguments | ||
displayName: AdditionalArguments (passed to PerfAutomation) | ||
type: string | ||
default: ' ' | ||
|
||
extends: | ||
template: /eng/pipelines/templates/jobs/perf.yml | ||
parameters: | ||
serviceDirectory: storage/azure-storage-file-datalake | ||
services: "^storage-file-datalake$" | ||
packageVersions: ${{ parameters.packageVersions }} | ||
tests: ${{ parameters.tests }} | ||
arguments: ${{ parameters.arguments }} | ||
iterations: ${{ parameters.iterations }} | ||
additionalArguments: ${{ parameters.additionalArguments }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
param baseName string = resourceGroup().name | ||
param location string = resourceGroup().location | ||
|
||
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = { | ||
name: '${baseName}files' | ||
location: location | ||
kind: 'FileStorage' | ||
sku: { | ||
name: 'Premium_LRS' | ||
} | ||
|
||
resource service 'fileServices' = { | ||
name: 'default' | ||
properties: { | ||
shareDeleteRetentionPolicy: { | ||
enabled: false | ||
} | ||
} | ||
} | ||
} | ||
|
||
var name = storageAccount.name | ||
var key = storageAccount.listKeys().keys[0].value | ||
var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key}' | ||
|
||
output AZURE_STORAGE_ACCOUNT_NAME string = name | ||
output AZURE_STORAGE_ACCOUNT_KEY string = key | ||
output AZURE_STORAGE_CONNECTION_STRING string = connectionString | ||
output STANDARD_STORAGE_CONNECTION_STRING string = connectionString | ||
output STORAGE_CONNECTION_STRING string = connectionString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
parameters: | ||
- name: packageVersions | ||
displayName: PackageVersions (regex of package versions to run) | ||
type: string | ||
default: '12|source' | ||
- name: tests | ||
displayName: Tests (regex of tests to run) | ||
type: string | ||
default: '^(download|upload)$' | ||
- name: arguments | ||
displayName: Arguments (regex of arguments to run) | ||
type: string | ||
default: '(10240)|(10485760)|(1073741824)' | ||
- name: iterations | ||
displayName: Iterations (times to run each test) | ||
type: number | ||
default: '5' | ||
- name: additionalArguments | ||
displayName: AdditionalArguments (passed to PerfAutomation) | ||
type: string | ||
default: ' ' | ||
|
||
extends: | ||
template: /eng/pipelines/templates/jobs/perf.yml | ||
parameters: | ||
serviceDirectory: storage/azure-storage-file-share | ||
services: "^storage-file-share$" | ||
packageVersions: ${{ parameters.packageVersions }} | ||
tests: ${{ parameters.tests }} | ||
arguments: ${{ parameters.arguments }} | ||
iterations: ${{ parameters.iterations }} | ||
additionalArguments: ${{ parameters.additionalArguments }} |