From 5e91f5584ee1a3f8ca56e7b20376bf7900a42c46 Mon Sep 17 00:00:00 2001 From: George Arama <50641385+gearama@users.noreply.github.com> Date: Wed, 8 Mar 2023 12:28:13 -0800 Subject: [PATCH] Enable profiling in perf piplines. (#4398) * profiling * dsadsada * Update eng/pipelines/templates/jobs/perf.yml Co-authored-by: Mike Harder --------- Co-authored-by: Mike Harder --- eng/pipelines/templates/jobs/perf.yml | 15 ++++++++++++++- sdk/core/perf.yml | 8 ++++---- .../azure-security-keyvault-certificates/perf.yml | 8 ++++---- .../azure-security-keyvault-keys/perf.yml | 8 ++++---- .../azure-security-keyvault-secrets/perf.yml | 8 ++++---- sdk/storage/azure-storage-blobs/perf.yml | 8 ++++---- 6 files changed, 34 insertions(+), 21 deletions(-) diff --git a/eng/pipelines/templates/jobs/perf.yml b/eng/pipelines/templates/jobs/perf.yml index 4b59e35b38..3b4a7cf3ea 100644 --- a/eng/pipelines/templates/jobs/perf.yml +++ b/eng/pipelines/templates/jobs/perf.yml @@ -20,6 +20,9 @@ parameters: - name: AdditionalArguments type: string default: '' +- name: Profile + type: boolean + default: false - name: EnvVars type: object default: [] @@ -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}} diff --git a/sdk/core/perf.yml b/sdk/core/perf.yml index 0e00954cca..fc8efffb83 100644 --- a/sdk/core/perf.yml +++ b/sdk/core/perf.yml @@ -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 @@ -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) diff --git a/sdk/keyvault/azure-security-keyvault-certificates/perf.yml b/sdk/keyvault/azure-security-keyvault-certificates/perf.yml index 7202344f4a..a1cda9a766 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/perf.yml +++ b/sdk/keyvault/azure-security-keyvault-certificates/perf.yml @@ -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 @@ -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) diff --git a/sdk/keyvault/azure-security-keyvault-keys/perf.yml b/sdk/keyvault/azure-security-keyvault-keys/perf.yml index e070b80d5d..2020fbb505 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/perf.yml +++ b/sdk/keyvault/azure-security-keyvault-keys/perf.yml @@ -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 @@ -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) diff --git a/sdk/keyvault/azure-security-keyvault-secrets/perf.yml b/sdk/keyvault/azure-security-keyvault-secrets/perf.yml index 2e1b1dda15..a28ee7f8f2 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/perf.yml +++ b/sdk/keyvault/azure-security-keyvault-secrets/perf.yml @@ -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 @@ -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) diff --git a/sdk/storage/azure-storage-blobs/perf.yml b/sdk/storage/azure-storage-blobs/perf.yml index 3c5a553201..69b5f46e7a 100644 --- a/sdk/storage/azure-storage-blobs/perf.yml +++ b/sdk/storage/azure-storage-blobs/perf.yml @@ -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 @@ -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)