Skip to content

Commit 4899065

Browse files
authored
[perf] Add pipeline template and storage pipelines (#24894)
1 parent 88055b3 commit 4899065

File tree

7 files changed

+288
-0
lines changed

7 files changed

+288
-0
lines changed

eng/pipelines/templates/jobs/perf.yml

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
parameters:
2+
- name: serviceDirectory
3+
type: string
4+
default: ''
5+
- name: services
6+
type: string
7+
default: ''
8+
- name: packageVersions
9+
type: string
10+
default: '.*'
11+
- name: tests
12+
type: string
13+
default: ''
14+
- name: arguments
15+
type: string
16+
default: ''
17+
- name: iterations
18+
type: number
19+
default: '5'
20+
- name: envVars
21+
type: object
22+
default: {}
23+
- name: additionalArguments
24+
type: string
25+
default: ''
26+
27+
variables:
28+
- template: /eng/pipelines/templates/variables/globals.yml
29+
- name: Pool
30+
value: 'azsdk-pool-mms-ubuntu-2004-perf'
31+
- name: OSVmImage
32+
value: 'MMSUbuntu20.04'
33+
- name: PythonVersion
34+
value: '3.7'
35+
36+
resources:
37+
repositories:
38+
- repository: azure-sdk-tools
39+
type: github
40+
endpoint: Azure
41+
name: Azure/azure-sdk-tools
42+
43+
jobs:
44+
- job: Perf
45+
timeoutInMinutes: 360
46+
pool:
47+
name: $(Pool)
48+
vmImage: $(OSVmImage)
49+
steps:
50+
- checkout: self
51+
path: s
52+
53+
- checkout: azure-sdk-tools
54+
path: s/azure-sdk-tools
55+
56+
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml
57+
parameters:
58+
AgentImage: $(OSVmImage)
59+
60+
- task: UsePythonVersion@0
61+
displayName: "Use Python $(PythonVersion)"
62+
inputs:
63+
versionSpec: $(PythonVersion)
64+
65+
- template: /eng/common/TestResources/deploy-test-resources.yml
66+
parameters:
67+
ServiceDirectory: ${{ parameters.serviceDirectory }}
68+
Location: westus
69+
ResourceType: perf
70+
71+
- pwsh: |
72+
set-content -path config.yml -value "WorkingDirectories:"
73+
add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/s"
74+
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation
75+
displayName: Create config.yml
76+
77+
- script: >-
78+
dotnet run -- run
79+
--no-sync
80+
--languages python
81+
--services "${{ parameters.services }}"
82+
--package-versions "${{ parameters.packageVersions }}"
83+
--tests "${{ parameters.tests }}"
84+
--arguments "${{ parameters.arguments }}"
85+
--iterations ${{ parameters.iterations }}
86+
${{ parameters.additionalArguments }}
87+
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation
88+
env:
89+
${{ each var in parameters.EnvVars }}:
90+
${{ var.key }}: ${{ var.value }}
91+
displayName: Run perf tests
92+
93+
- pwsh: |
94+
get-content results.csv
95+
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results
96+
displayName: Print results.csv
97+
98+
- pwsh: |
99+
get-content results.json
100+
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results
101+
displayName: Print results.json
102+
103+
- template: /eng/common/TestResources/remove-test-resources.yml
104+
parameters:
105+
ServiceDirectory: ${{ parameters.serviceDirectory }}
106+
ResourceType: perf
107+
108+
- task: PublishPipelineArtifact@1
109+
inputs:
110+
targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results
111+
artifactName: results
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
param baseName string = resourceGroup().name
2+
param location string = resourceGroup().location
3+
4+
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = {
5+
name: '${baseName}blob'
6+
location: location
7+
kind: 'BlockBlobStorage'
8+
sku: {
9+
name: 'Premium_LRS'
10+
}
11+
}
12+
13+
var name = storageAccount.name
14+
var key = storageAccount.listKeys().keys[0].value
15+
var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key}'
16+
17+
output AZURE_STORAGE_ACCOUNT_NAME string = name
18+
output AZURE_STORAGE_ACCOUNT_KEY string = key
19+
output AZURE_STORAGE_CONNECTION_STRING string = connectionString
20+
output STANDARD_STORAGE_CONNECTION_STRING string = connectionString
21+
output STORAGE_CONNECTION_STRING string = connectionString
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
parameters:
2+
- name: packageVersions
3+
displayName: PackageVersions (regex of package versions to run)
4+
type: string
5+
default: '12|source'
6+
- name: tests
7+
displayName: Tests (regex of tests to run)
8+
type: string
9+
default: '^(download|upload|list-blobs)$'
10+
- name: arguments
11+
displayName: Arguments (regex of arguments to run)
12+
type: string
13+
default: '(10240)|(10485760)|(1073741824)|(5 )|(500 )|(50000 )'
14+
- name: iterations
15+
displayName: Iterations (times to run each test)
16+
type: number
17+
default: '5'
18+
- name: additionalArguments
19+
displayName: AdditionalArguments (passed to PerfAutomation)
20+
type: string
21+
default: ' '
22+
23+
extends:
24+
template: /eng/pipelines/templates/jobs/perf.yml
25+
parameters:
26+
serviceDirectory: storage/azure-storage-blob
27+
services: "^storage-blob$"
28+
packageVersions: ${{ parameters.packageVersions }}
29+
tests: ${{ parameters.tests }}
30+
arguments: ${{ parameters.arguments }}
31+
iterations: ${{ parameters.iterations }}
32+
additionalArguments: ${{ parameters.additionalArguments }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
param baseName string = resourceGroup().name
2+
param location string = resourceGroup().location
3+
4+
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = {
5+
name: '${baseName}dlake'
6+
location: location
7+
kind: 'BlockBlobStorage'
8+
sku: {
9+
name: 'Premium_LRS'
10+
}
11+
properties: {
12+
isHnsEnabled: true
13+
}
14+
}
15+
16+
var name = storageAccount.name
17+
var key = storageAccount.listKeys().keys[0].value
18+
19+
// EndpointSuffix is required by azure-storage-file-datalake 12.7.0 and earlier (fixed in #24779)
20+
var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key};EndpointSuffix=core.windows.net'
21+
22+
// .NET
23+
output DATALAKE_STORAGE_ACCOUNT_NAME string = name
24+
output DATALAKE_STORAGE_ACCOUNT_KEY string = key
25+
26+
// Java, JS
27+
output STORAGE_CONNECTION_STRING string = connectionString
28+
29+
// Python
30+
output AZURE_STORAGE_CONNECTION_STRING string = connectionString
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
parameters:
2+
- name: packageVersions
3+
displayName: PackageVersions (regex of package versions to run)
4+
type: string
5+
default: '12|source'
6+
- name: tests
7+
displayName: Tests (regex of tests to run)
8+
type: string
9+
default: '^(download|upload)$'
10+
- name: arguments
11+
displayName: Arguments (regex of arguments to run)
12+
type: string
13+
default: '(10240)|(10485760)|(1073741824)'
14+
- name: iterations
15+
displayName: Iterations (times to run each test)
16+
type: number
17+
default: '5'
18+
- name: additionalArguments
19+
displayName: AdditionalArguments (passed to PerfAutomation)
20+
type: string
21+
default: ' '
22+
23+
extends:
24+
template: /eng/pipelines/templates/jobs/perf.yml
25+
parameters:
26+
serviceDirectory: storage/azure-storage-file-datalake
27+
services: "^storage-file-datalake$"
28+
packageVersions: ${{ parameters.packageVersions }}
29+
tests: ${{ parameters.tests }}
30+
arguments: ${{ parameters.arguments }}
31+
iterations: ${{ parameters.iterations }}
32+
additionalArguments: ${{ parameters.additionalArguments }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
param baseName string = resourceGroup().name
2+
param location string = resourceGroup().location
3+
4+
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = {
5+
name: '${baseName}files'
6+
location: location
7+
kind: 'FileStorage'
8+
sku: {
9+
name: 'Premium_LRS'
10+
}
11+
12+
resource service 'fileServices' = {
13+
name: 'default'
14+
properties: {
15+
shareDeleteRetentionPolicy: {
16+
enabled: false
17+
}
18+
}
19+
}
20+
}
21+
22+
var name = storageAccount.name
23+
var key = storageAccount.listKeys().keys[0].value
24+
var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key}'
25+
26+
output AZURE_STORAGE_ACCOUNT_NAME string = name
27+
output AZURE_STORAGE_ACCOUNT_KEY string = key
28+
output AZURE_STORAGE_CONNECTION_STRING string = connectionString
29+
output STANDARD_STORAGE_CONNECTION_STRING string = connectionString
30+
output STORAGE_CONNECTION_STRING string = connectionString
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
parameters:
2+
- name: packageVersions
3+
displayName: PackageVersions (regex of package versions to run)
4+
type: string
5+
default: '12|source'
6+
- name: tests
7+
displayName: Tests (regex of tests to run)
8+
type: string
9+
default: '^(download|upload)$'
10+
- name: arguments
11+
displayName: Arguments (regex of arguments to run)
12+
type: string
13+
default: '(10240)|(10485760)|(1073741824)'
14+
- name: iterations
15+
displayName: Iterations (times to run each test)
16+
type: number
17+
default: '5'
18+
- name: additionalArguments
19+
displayName: AdditionalArguments (passed to PerfAutomation)
20+
type: string
21+
default: ' '
22+
23+
extends:
24+
template: /eng/pipelines/templates/jobs/perf.yml
25+
parameters:
26+
serviceDirectory: storage/azure-storage-file-share
27+
services: "^storage-file-share$"
28+
packageVersions: ${{ parameters.packageVersions }}
29+
tests: ${{ parameters.tests }}
30+
arguments: ${{ parameters.arguments }}
31+
iterations: ${{ parameters.iterations }}
32+
additionalArguments: ${{ parameters.additionalArguments }}

0 commit comments

Comments
 (0)