You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/core/azure_core_test/src/perf/README.md
+48-6Lines changed: 48 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,9 +159,22 @@ Before you can declare your test pipeline, you need to create some infrastructur
159
159
160
160
Test pipelines are defined using a [`perf.yml`](https://github.com/Azure/azure-sdk-for-rust/blob/main/sdk/storage/azure_storage_blob/perf.yml) file declared in the package directory.
161
161
162
-
For example, from the `storage/azure_storage_blob` package:
162
+
For example (from the `storage/azure_storage_blob` package):
163
163
164
164
```yml
165
+
trigger: none
166
+
167
+
pr: none
168
+
169
+
# Schedule the pipeline to run at UTC+7 Hours (Midnight Pacific time)
170
+
schedules:
171
+
- cron: "0 7 * * *"
172
+
displayName: Daily midnight run.
173
+
branches:
174
+
include:
175
+
- main
176
+
always: true
177
+
165
178
parameters:
166
179
- name: PackageVersions
167
180
displayName: PackageVersions (regex of package versions to run)
@@ -199,9 +212,7 @@ extends:
199
212
Profile: ${{ parameters.Profile }}
200
213
```
201
214
202
-
***TODO Update this to include yml based triggers***
203
-
204
-
You'll want to configure the `ServiceDirectory` field to match the location of your package.
215
+
You'll want to configure the `ServiceDirectory` field to match the location of your package, and tweak the default values for the variables to match your performance tests.
205
216
206
217
#### Performance Test Yaml Configuration
207
218
@@ -251,7 +262,8 @@ And FINALLY, you need to create a pull request containing this file and find the
251
262
252
263
#### Creating the performance pipeline
253
264
254
-
Once the pull request
265
+
Once the pull request you created above has been committed to the branch, you can start to create the performance pipelines (note: DO NOT ATTEMPT TO CREATE THE PIPELINE UNTIL THE `perf.yml` file mentioned above is in `main` - if you don't, you are highly likely to disrupt all operations in the repository).
266
+
255
267
Navigate to the `azure-sdk` Azure DevOps instance, and select the `internal` project.
256
268
257
269
Within the `internal` project, select `Pipelines`, select "All" from the right hand pane. This will show a tree structured hierarchy of pipelines.
@@ -268,4 +280,34 @@ Next select `Azure/azure-sdk-for-rust` to specify the Rust SDK and configure you
268
280
269
281
Select your pipeline file from the main branch of the repository and you're almost done.
270
282
271
-
The next thing you want to do is to "save" the new pipeline.
283
+
The next thing you want to do is to "save" the new pipeline. This will cause your pipeline to be created. You can also attempt to `run` the pipeline at this point but it is likely to fail.
284
+
285
+
You now need to set the required variables or the pipeline. Performance pipelines require the `Secrets for Resource Provisioner` variable group added to the pipeline. To add this, select the newly created pipeline, and click on `Edit`. Navigate to the `...` menu and select `Triggers`. This brings up the `Yaml`, `Variables`, `Triggers` and `History` edit. Make sure that all the triggers (included scheduled triggers) are cleared from the `Triggers` - Rust performance pipeline triggers are managed by the pipeline yaml file, rather than in the Azure DevOps user interface.
286
+
287
+
Select `Variables`, which allows you to add variables to the pipeline. You want to select `Variable groups` in the left hand column and select `Link variable group` in the right hand column.
288
+
289
+
That will bring up a pane on the right with a number of variable groups. You want to select the `Secrets for Resource Provisioner` variable group and click the `Link` button.
290
+
291
+
Once you've saved these changes, your pipeline should be ready to run.
292
+
293
+
You may need to ask for help from the Azure SDK Engineering Systems team to enable access to test resources for your pipeline.
294
+
295
+
## Running the test automation locally
296
+
297
+
It is possible to run the performance test automation locally, that is often helpful when debugging performance tests.
298
+
299
+
Running the performance tests locally requires a clone of the `Azure/azure-sdk-tools` repo.
300
+
301
+
Start at the root of the `azure-sdk-tools` repo and navigate to the `tools/perf-automation/Azure.Sdk.Tools/PerfAutomation` directory:
302
+
303
+
```bash
304
+
cd tools/perf-automation/Azure.Sdk.Tools/PerfAutomation
305
+
```
306
+
307
+
Then run the perf automation tool, replacing your repo on the command line:
308
+
309
+
```bash
310
+
dotnet run . -- -l rust --language-version N/A --tests-file {Path to perf-tests.yml file in your repo} --repo-root {Path to the root of your repo}
311
+
```
312
+
313
+
This will run your performance tests and save the results in the `results` directory locally.
0 commit comments