Skip to content

Commit

Permalink
Enable profiling in perf piplines. (#4398)
Browse files Browse the repository at this point in the history
* profiling

* dsadsada

* Update eng/pipelines/templates/jobs/perf.yml

Co-authored-by: Mike Harder <[email protected]>

---------

Co-authored-by: Mike Harder <[email protected]>
  • Loading branch information
gearama and mikeharder authored Mar 8, 2023
1 parent 7946b83 commit 5e91f55
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 21 deletions.
15 changes: 14 additions & 1 deletion eng/pipelines/templates/jobs/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ parameters:
- name: AdditionalArguments
type: string
default: ''
- name: Profile
type: boolean
default: false
- name: EnvVars
type: object
default: []
Expand All @@ -31,11 +34,21 @@ extends:
- template: /eng/pipelines/templates/variables/globals.yml
Language: Cpp
LanguageVersion: 'N/A'
InstallLanguageSteps: ${{ parameters.InstallLanguageSteps }}
InstallLanguageSteps:
- pwsh: |
Write-Host "##vso[task.setvariable variable=VCPKG_BINARY_SOURCES_SECRET;issecret=true;]clear;x-azblob,https://cppvcpkgcache.blob.core.windows.net/public-vcpkg-container,,read"
displayName: Set Vcpkg Variables
- ${{ if parameters.Profile }}:
- task: Bash@3
inputs:
targetType: 'inline'
script: sudo apt install valgrind -y
displayName: Install valgrind
ServiceDirectory: ${{ parameters.ServiceDirectory }}
PackageVersions: ${{ parameters.PackageVersions }}
Tests: ${{ parameters.Tests }}
Arguments: ${{ parameters.Arguments }}
Iterations: ${{ parameters.Iterations }}
AdditionalArguments: ${{ parameters.AdditionalArguments }}
Profile: ${{ parameters.Profile }}
EnvVars: ${{ parameters.EnvVars}}
8 changes: 4 additions & 4 deletions sdk/core/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ parameters:
displayName: Iterations (times to run each test)
type: number
default: '5'
- name: Profile
type: boolean
default: false
- name: AdditionalArguments
displayName: AdditionalArguments (passed to PerfAutomation)
type: string
Expand All @@ -23,16 +26,13 @@ parameters:
extends:
template: /eng/pipelines/templates/jobs/perf.yml
parameters:
InstallLanguageSteps:
- pwsh: |
Write-Host "##vso[task.setvariable variable=VCPKG_BINARY_SOURCES_SECRET;issecret=true;]clear;x-azblob,https://cppvcpkgcache.blob.core.windows.net/public-vcpkg-container,,read"
displayName: Set Vcpkg Variables
ServiceDirectory: core
PackageVersions: ${{ parameters.PackageVersions }}
Tests: ${{ parameters.Tests }}
Arguments: ${{ parameters.Arguments }}
Iterations: ${{ parameters.Iterations }}
AdditionalArguments: ${{ parameters.AdditionalArguments }}
Profile: ${{ parameters.Profile }}
EnvVars:
# This is set in the InstallLanguageSteps
VCPKG_BINARY_SOURCES_SECRET: $(VCPKG_BINARY_SOURCES_SECRET)
8 changes: 4 additions & 4 deletions sdk/keyvault/azure-security-keyvault-certificates/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ parameters:
displayName: Iterations (times to run each test)
type: number
default: '5'
- name: Profile
type: boolean
default: false
- name: AdditionalArguments
displayName: AdditionalArguments (passed to PerfAutomation)
type: string
Expand All @@ -23,16 +26,13 @@ parameters:
extends:
template: /eng/pipelines/templates/jobs/perf.yml
parameters:
InstallLanguageSteps:
- pwsh: |
Write-Host "##vso[task.setvariable variable=VCPKG_BINARY_SOURCES_SECRET;issecret=true;]clear;x-azblob,https://cppvcpkgcache.blob.core.windows.net/public-vcpkg-container,,read"
displayName: Set Vcpkg Variables
ServiceDirectory: keyvault/azure-security-keyvault-certificates
PackageVersions: ${{ parameters.PackageVersions }}
Tests: ${{ parameters.Tests }}
Arguments: ${{ parameters.Arguments }}
Iterations: ${{ parameters.Iterations }}
AdditionalArguments: ${{ parameters.AdditionalArguments }}
Profile: ${{ parameters.Profile }}
EnvVars:
# This is set in the InstallLanguageSteps
VCPKG_BINARY_SOURCES_SECRET: $(VCPKG_BINARY_SOURCES_SECRET)
8 changes: 4 additions & 4 deletions sdk/keyvault/azure-security-keyvault-keys/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ parameters:
displayName: Iterations (times to run each test)
type: number
default: '5'
- name: Profile
type: boolean
default: false
- name: AdditionalArguments
displayName: AdditionalArguments (passed to PerfAutomation)
type: string
Expand All @@ -23,16 +26,13 @@ parameters:
extends:
template: /eng/pipelines/templates/jobs/perf.yml
parameters:
InstallLanguageSteps:
- pwsh: |
Write-Host "##vso[task.setvariable variable=VCPKG_BINARY_SOURCES_SECRET;issecret=true;]clear;x-azblob,https://cppvcpkgcache.blob.core.windows.net/public-vcpkg-container,,read"
displayName: Set Vcpkg Variables
ServiceDirectory: keyvault/azure-security-keyvault-keys
PackageVersions: ${{ parameters.PackageVersions }}
Tests: ${{ parameters.Tests }}
Arguments: ${{ parameters.Arguments }}
Iterations: ${{ parameters.Iterations }}
AdditionalArguments: ${{ parameters.AdditionalArguments }}
Profile: ${{ parameters.Profile }}
EnvVars:
# This is set in the InstallLanguageSteps
VCPKG_BINARY_SOURCES_SECRET: $(VCPKG_BINARY_SOURCES_SECRET)
8 changes: 4 additions & 4 deletions sdk/keyvault/azure-security-keyvault-secrets/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ parameters:
displayName: Iterations (times to run each test)
type: number
default: '5'
- name: Profile
type: boolean
default: false
- name: AdditionalArguments
displayName: AdditionalArguments (passed to PerfAutomation)
type: string
Expand All @@ -23,16 +26,13 @@ parameters:
extends:
template: /eng/pipelines/templates/jobs/perf.yml
parameters:
InstallLanguageSteps:
- pwsh: |
Write-Host "##vso[task.setvariable variable=VCPKG_BINARY_SOURCES_SECRET;issecret=true;]clear;x-azblob,https://cppvcpkgcache.blob.core.windows.net/public-vcpkg-container,,read"
displayName: Set Vcpkg Variables
ServiceDirectory: keyvault/azure-security-keyvault-secrets
PackageVersions: ${{ parameters.PackageVersions }}
Tests: ${{ parameters.Tests }}
Arguments: ${{ parameters.Arguments }}
Iterations: ${{ parameters.Iterations }}
AdditionalArguments: ${{ parameters.AdditionalArguments }}
Profile: ${{ parameters.Profile }}
EnvVars:
# This is set in the InstallLanguageSteps
VCPKG_BINARY_SOURCES_SECRET: $(VCPKG_BINARY_SOURCES_SECRET)
8 changes: 4 additions & 4 deletions sdk/storage/azure-storage-blobs/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ parameters:
displayName: Iterations (times to run each test)
type: number
default: '5'
- name: Profile
type: boolean
default: false
- name: AdditionalArguments
displayName: AdditionalArguments (passed to PerfAutomation)
type: string
Expand All @@ -23,16 +26,13 @@ parameters:
extends:
template: /eng/pipelines/templates/jobs/perf.yml
parameters:
InstallLanguageSteps:
- pwsh: |
Write-Host "##vso[task.setvariable variable=VCPKG_BINARY_SOURCES_SECRET;issecret=true;]clear;x-azblob,https://cppvcpkgcache.blob.core.windows.net/public-vcpkg-container,,read"
displayName: Set Vcpkg Variables
ServiceDirectory: storage/azure-storage-blobs
PackageVersions: ${{ parameters.PackageVersions }}
Tests: ${{ parameters.Tests }}
Arguments: ${{ parameters.Arguments }}
Iterations: ${{ parameters.Iterations }}
AdditionalArguments: ${{ parameters.AdditionalArguments }}
Profile: ${{ parameters.Profile }}
EnvVars:
# This is set in the InstallLanguageSteps
VCPKG_BINARY_SOURCES_SECRET: $(VCPKG_BINARY_SOURCES_SECRET)

0 comments on commit 5e91f55

Please sign in to comment.