azure-sdk-for-cpp/doc/PerformanceTesting.md
Larry Osterman 7c52924288
Sync Main branch with WebSockets branch. (#4072)
* Stress test (#3820)

* mem leak fix

* PR comments fix

* PR comments

* seems to work?

* clang

* curl again

* add first stress test

* also update gitignore

* missing line

* only linux

* clang typo format

* typo 2

* PR comments

* cspell

* remove terminator

* Fixed the metadata for better handling (#3824)

Co-authored-by: sima-zhu <sizhu@microsoft.com>

* Update attestation core vcpkg dependency to latest GA version that is required. (#3830)

* Update attestation core vcpkg dependency to latest GA version that is required.

* Update vcpkg config.cmake to match the dependency version needed.

* Remove winhttp (#3832)

* remove refs to winhttp

* this tsst only curl

* Move perf.yml to eng/common (#3833)

Co-authored-by: Mike Harder <mharder@microsoft.com>

* Sync eng/common directory with azure-sdk-tools for PR 3656 (#3834)

* someone wants to reference the test-proxy startup scripts externally. to make this easy on them we're parameterizing the root of the eng/common for easy use in that scenario
* two leading $ signs on the definition of the certificate path was causing some issues!

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* Update casing for 'verison' (#3821)

Co-authored-by: Daniel Jurek <djurek@microsoft.com>

* Print additional result summary formats to pipelines UI (#3842)

Co-authored-by: Mike Harder <mharder@microsoft.com>

* Sync eng/common directory with azure-sdk-tools for PR 3702 (#3843)

* Add language-service to list of valid sample slugs

* Update link to taxonomies

Co-authored-by: Heath Stewart <heaths@microsoft.com>

* Fix incorrect failure notification in vcpkg publishing (#3838)

* Set up for testing of template pipeline

* Override branches, set up for template GA release

* More TODOs to prevent merging an unintended change

* More removal of TestPipeline

* Increment template version number

* Use script to set package version

* Check out the correct branch

* branch parameter in the command

* Use $(PublishToVcpkg) to determine if we should check for changes

* dictionary syntax

* Set GA package version to validate GA publish scenario

* Update changelog

* create-pull-request.yml optionally pushes changes

* Output GH PR URI

* Macro syntax with a variable set earlier

* Move up to 1.2.0-beta.2

* beta.1

* Revert changelog

* Revert testing-related changes

* Revert vcpkg-clone.yml

* Revert eng/common changes, ensure global $(HasChanges) is set properly

* Changes to enable testing

* 1.1.0-beta.1

* vcpkg clone should clone at configured branch

* Clone "main" branch of vcpkg betas

* Undo test-specific changes

* More PR cleanup

* PR cleanup

* Helm charts (#3841)

* helm chart

* first pipe setup

* poi

* magiks

* ewewe

* stress

* cleanup

* pr

* QFE and readme

* clang

* stupid clang , waste of time

* ewqwewewrqrewewrqewrqwrqr

* stupid clang

* cspell

* PR

* try try again

* clang again

* Sync eng/common directory with azure-sdk-tools for PR 3661 (#3846)

* Add full clone fallback to sparse checkout

* Improve clone handling and overrides for sparse checkout

* Use SkipSparseCheckout variable name

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Sync eng/common directory with azure-sdk-tools for PR 3735 (#3845)

* Detect API changes using new snadboxinx approach

* Added strictmode

* Remove unset variable

* Changes as per strict mode 3

* Rervert strict mode to allow language level fixes to merge first

Co-authored-by: praveenkuttappan <prmarott@microsoft.com>

* Increment version for keyvault releases (#3809)

* Increment package version after release of azure-security-keyvault-keys

* Increment package version after release of azure-security-keyvault-secrets

* Increment package version after release of azure-security-keyvault-certificates

* Removed hard dependency on opentelemetry version (#3844)

* Revert "Add full clone fallback to sparse checkout (#3661)" (#3851)

This reverts commit 7605ead00308dd20f20f2afe5acc4ec9900a2c47.

Co-authored-by: Ben Broderick Phillips <ben@benbp.net>

* Sync eng/common directory with azure-sdk-tools for PR 3753 (#3857)

* Bump MacOs version to macos-11

* Update eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* Update eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

Co-authored-by: sima-zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* Bump macOs version to macos-11 (#3853)

* Update CHANGELOG.md

* Fix misleading step name in az module install (#3859)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Retry poll calls on EINTR (#3858)

When signals are delievered to the process, calls here to poll may be
interrupted and return with a spurious failure.  The call instead should be
restarted.

* Fix bad path to sample matrix json (#3860)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Sync eng/common directory with azure-sdk-tools for PR 3826 (#3863)

* Add link checking for stress CI

* Remove region segment from stress testing links

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Core August releases (#3862)

* Core August releases

* cspell

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>

* Increment version for core releases (#3865)

* Increment package version after release of azure-core

* Increment package version after release of azure-core-tracing-opentelemetry

* Storage Aug GA release (#3864)

* CG only runs on internal (#3866)

* Condition added and indentation changes

* STG 79 80 81 Features (#3850)

* Sync eng/common directory with azure-sdk-tools for PR 3860 (#3871)

* updating pfx and cert
* update the targeted version of the proxy as well

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* Storage August Preview Release (#3868)

* Storage August Preview Release

* update versions

* Increment version for storage releases (#3875)

* Increment package version after release of azure-storage-common

* Increment package version after release of azure-storage-blobs

* Fix an issue that reason phrase is missing as expected from HTTP/2 server (#3879)

* Fix an issue that reason phrase is missing as expected from HTTP/2 server

* reverse the condition

* compact comments

* fix clang format

* Update CODEOWNERS (#3881)

* updated targeted proxy version to one that properly allows consumption of TLS certificates (#3888)

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* Fix `azure-storage-blobs-cpp` beta install (#3889)

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>

* Fixed #3899 - Handle new OSX version correctly; reformatted platform-matrix JSON files (#3900)

* Simpler get-binarysizes check for OSX (#3901)

* Simpler get-binarysizes check for OSX

* Missed wildcard

* Sync eng/common directory with azure-sdk-tools for PR 3874 (#3907)

* Add sparse checkout to perf template

* Rename base template, add parameters

* Add comment

* Add TODO

* Fix copy/pase bug, add language to artifacts path

* Fix language ref

* Fix python language

* perf.yml extends perf-base.yml

* Remove unnecessary base yml

* Fetch pull request refs

* Fix refs path

* Fetch commitish if matches PR syntax

* Print command before running

* Add PR commitish to remote.origin.fetch

* Add pool and vmimage parameters

* Map ref under "refs/remotes/origin"

* Add ref to refs/remotes/origin

Co-authored-by: Mike Harder <mharder@microsoft.com>

* File Share Features until STG82 (#3908)

* Empty file or existing file won't be created/overwritten if the blob to be downloaded doesn't exist. (#3910)

* Remove unnecessary checkout: none that causes conflicts with sparse checkout declarations (#3915)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Core September Release (#3913)

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>

* Increment package version after release of azure-core (#3919)

* Migrate SkipDefaultCheckout to SkipCheckoutNone (#3916)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Storage Sept Release (#3914)

* Increment version for storage releases (#3924)

* Increment package version after release of azure-storage-common

* Increment package version after release of azure-storage-blobs

* Increment package version after release of azure-storage-files-shares

* Add github actions based check enforcer (#3922)

* Add `$schema` to `cgmanifest.json` (#3918)

Co-authored-by: Jamie Magee <jamie.magee@microsoft.com>

* Remove SkipDefaultCheckout parameter (#3930)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Compatibility improvement for striped blob (#3932)

* add a parameter 'condition' to the test-proxy ci invocations. (#3931)

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* storage ad-hoc release (#3934)

* Increment package version after release of azure-storage-blobs (#3935)

* Update `AttestationClient::AttestTpm` API to match existing `AttestOpenEnclave` and `AttestSgxmEnclave`  (#3928)

* Fix broken link and typo in contributing.md

* Use vector<uint8_t> for attest instead of strings

* remove options

* fix comments

* update release version

* remove versionig

* revert changelog

* add the change

* update comment

* Update sdk/attestation/azure-security-attestation/CHANGELOG.md

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* fix formatting

* address pr comment

* fix formating

* update a comment

* remove the attest tpm comment

Co-authored-by: Peng Li <pengfeli@microsoft.com>
Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* Update check enforcer yaml permissions and name (#3944)

* Set VCPKG_ROOT (#3938)

* Set VCPKG_ROOT

* Update eng/pipelines/templates/steps/vcpkg-clone.yml

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Sync the devops helper scripts between azure-sdk repo and tools repo (#3949)

This should fix https://github.com/Azure/azure-sdk-tools/issues/3538
as it will now upgrade the devops extension to the latest version
which has the auth fix needed.

Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>

* Add Win32FileTimeConverter (#3941)

* Sync eng/common directory with azure-sdk-tools for PR 4169 (#3950)

* pin newest version of proxy

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* Enable Query() test in blob SDK (#3960)

* Sync eng/common directory with azure-sdk-tools for PR 4212 (#3962)

* version including lock fixes
* target the correct proxy version

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* Pipeline core (#3953)

* test1

* glob

* quick cleanup

* ddasda

* ddsa

* envs

* dsds

* Revert "ddsa"

This reverts commit 6d9e385284ba37736fb5bc41e56065943abd7937.

* wq

* comment out issues

* valid test

* maybe

* qwewqewq

* lang steps

* Vcpkg pre-steps in the place Daniel should've recommend they go

* RepoOwner

* Correct repo owner name

* Remove vcpkg.yml (we don't need to write)

* PR trigger

* small change

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

Co-authored-by: Mike Harder <mharder@microsoft.com>

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

Co-authored-by: Mike Harder <mharder@microsoft.com>

* Update sdk/core/perf.yml

Co-authored-by: Mike Harder <mharder@microsoft.com>

Co-authored-by: Daniel Jurek <djurek@microsoft.com>
Co-authored-by: Mike Harder <mharder@microsoft.com>

* Win32FileTimeConverter (#3967)

* Sync eng/common directory with azure-sdk-tools for PR 4240 (#3965)

* use version of docker with CLI present

* target repaired executable

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* Revert "Add Win32FileTimeConverter (#3941)" (#3966)

This reverts commit 14e4f52b91.

* add test case for batch options on snapshots and versions (#3970)

* add test case for batch options on snapshots and versions

* recording

* Merge feature/datalakestg82 (#3973)

* Build subscription configuration from cloud config values (#3976)

* fix LROs in keyvault (#3952)

* fix LROs in keyvault

* qfe

* some cleanup

* fdd

* clangs

* correct fix

* oops

* Pull all Websockets changes to main except for WebSockets itself. (#3954)

* Pulled WebSocket fixes into main except for WebSockets functionality


Co-authored-by: Rick Winter <rick.winter@microsoft.com>
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
Co-authored-by: George Arama <50641385+gearama@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com>
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>

* Upadte Attestation changelog.md (#3992)

* Remove cspell directive from being visible (#3993)

* Update Attestation readme.md (#3991)

* Fixed memory leak in curl (#3995)

* Fixed memory leak in curl

* fixed documentation in unique_handle.hpp

* Fixup comment in unique_handle.hpp to reference curl_easy_cleanup rather than curl_free. (#3997)

* Azure Core October Release (#3996)

* Azure Core October Release

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>

* Sync eng/common directory with azure-sdk-tools for PR 4315 (#3999)

* update target version to one that includes integration discovered bugfixes

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* Increment package version after release of azure-core (#4000)

* Fix 50x errors while loading page links (#4001)

We have hit a few 50x errors while pulling a page to get
links and that has caused the rest of the link checking to
terminate early. To fix that we switching to LogError which will
output an error in devops instead of Write-Error which terminates
immediately. We also add some retry count to the page retrieval
and cache file retrieval to help with these transitent 50x issues.

Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>

* enable datalake softdelete tests (#3974)

* Small updates for core tests to work with the main automation. (#4004)

* core tests

* clang

* datalakestg82/change IsServerEncrypted not nullable (#4005)

* Add default .assets directory to .gitignore (#4008)

* Storage October release (#3975)

* Increment version for storage releases (#4013)

* Increment package version after release of azure-storage-blobs

* Increment package version after release of azure-storage-files-datalake

* Increment package version after release of azure-storage-files-shares

* Key Vault October releases (#4010)

* prepScript

* Updates for changelogs for 7.3

* target version with fixes (#4003)

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* Increment version for keyvault releases (#4014)

* Increment package version after release of azure-security-keyvault-keys

* Increment package version after release of azure-security-keyvault-certificates

* Increment package version after release of azure-security-keyvault-secrets

* Attestation October (#4017)

* Updated attestation change log to add periods for consistency (#4016)

* Updated attestation change log to add periods for consistency

* Update wording for a breaking change.

* Add back-ticks.

* Increment package version after release of azure-security-attestation (#4018)

* Bump the code owner retriver version. (#4020)

Co-authored-by: sima-zhu <sizhu@microsoft.com>

* Improved discoverability of tests; handle exceptions thrown during test execution (#4021)

* Improved discoverability of tests on WIndows; handle exceptions thrown during test execution better

* Vcpkg macro version for customers (#3909)

* macro version for customers

* remove other macros

* remove variable

* Core test (#4006)

* core tests

* clang

* vcpkg test

* dswsw

* first take on the vcpkg

* vcpkg

* get vcpkg version

* fix cmake

* separators

* vcpkg

* vcpkg

* test1

* disable verify agent od

* put back verify

* put back yml

* Update VCPKG Baseline due to zlib (#4027)

* override zlib version

* shwitch baseline

* macro update

* override zlib

* Fixed CURL build breaks discovered by newer openssl baselines (#4034)

* Vcpkg baseline to latest  (#4036)

* vcpkg baseline

* f4b262b259145adb2ab0116a390b08642489d32b

* 79fa9d85cb4510b05c2657bd7ec8a6a2cb266dc5

* 6ca56aeb457f033d344a7106cb3f9f1abf8f4e98

* override

* 1.4.1`

* Removed version override for opentelemetry (#4037)

* Removed version override for opentelemetry

* Disable deprecation warnings for open telemety tests to guard against future deprecations

* Added explanation for 4996 error; removed InMemoryExporter from documentation

* Sync eng/common directory with azure-sdk-tools for PR 3790 (#4041)

* Added yaml support for job matrix creation

* autogen scenario matrix for stress test

* Temporary Working State

* update to default sparse

* pr comments and some error handling

* custom matrixfilename and ordering of generatedValues.yaml

* common module import

* JobMatrix write host

Co-authored-by: Albert Cheng <albertcheng@microsoft.com>

* Storageblob (#4043)

* first take

* grrrrr

* qwqwq

* ewqw

* eewew

* put back

* pipeline

* Set read-only VCPKG_BINARY_SOURCES_SECRET

* Pass InstallLanguageSteps through the perf template

* blop pipeline

* path

* ';l'l;

* add support for sync param

* --sync flag support

* typo

* sync

* sync to y

* for PR

* clang

Co-authored-by: Daniel Jurek <djurek@microsoft.com>

* Upgrade cspell packages to version `^6.12.0` (#4044)

to address dependabot issue https://github.com/Azure/azure-sdk-for-js/security/dependabot/13

Co-authored-by: Jeremy Meng <yumeng@microsoft.com>

* Sync eng/common directory with azure-sdk-tools for PR 4480 (#4046)

* Add extra parameters for .net readme path

* Use another way for default value

* Remove custom source

Co-authored-by: sima-zhu <sizhu@microsoft.com>

* Converted WinHTTP to Async. (#4015)

* Async WinHTTP

* Added cancellation test; added support for request cancellation.

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
Co-authored-by: Rick Winter <rick.winter@microsoft.com>

* Updated OpenTelemetry tests to use their own `SpanExporter` rather than depend on the `InMemorySpanExporter`. (#4042)

* Removed version override for opentelemetry

* Disable deprecation warnings for open telemety tests to guard against future deprecations

* Added explanation for 4996 error; removed InMemoryExporter from documentation

* Checkpoint adding manual telemetry exporter

* Switch from using OpenTelemetry's InMemoryExporter (which is an internal-to-opentelemetry test hook) to our own SpanExporter

* removed unused variables because gcc doesn't like them

* Fixed doxygen comments

* Removed a bunch of unnecessary headers

* Update sdk/core/azure-core-tracing-opentelemetry/test/ut/test_exporter.hpp

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

* [Perf] Include GA versions of core package (#4053)

* Fix to for a SAL annotation (#4054)

* In-memory Identity token cache (#4024)

* identicalize the comments type (#4063)

* Improve scenario matrix edge case handling (#4065)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* docV1 (#4051)

* docV1

* Update doc/PerformanceTesting.md

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* Update doc/PerformanceTesting.md

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* Update doc/PerformanceTesting.md

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* Update doc/PerformanceTesting.md

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* comment

* some more updates

* Update doc/PerformanceTesting.md

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* Update doc/PerformanceTesting.md

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* Update doc/PerformanceTesting.md

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* PR

* Update doc/PerformanceTesting.md

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* bump version to newest (#4066)

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* Async WInHTTP changes to WebSockets; fixed a couple of websocket bugs reported by cognitive.

* cspell; clang-format

* Sync eng/common directory with azure-sdk-tools for PR 4543 (#4071)

* stress test addons version check

* cleanup

Co-authored-by: Albert Cheng <albertcheng@microsoft.com>

* Disable proxy test on mac

* Fixed crash caused by premature destruction of WinHttpRequest object.

* Disable proxy tests if proxy tests are disabled

* Fixed race condition shutting down connections due to TLS violations

* cspell

* moved cspell out of doxygen comments

* moved cspell out of doxygen comments

* Added the ability to select OpenSSL 1.1.1n if desired. (#4045)

* Added ability to switch to OpenSSL 1.1.1n

* Fixed OpenSSL compilation challenges - the CRL stuff works now

* Added instructions on using OpenSSL 1.1.1 to README

* Added vcpkg args to handle openssl variants

* Improved names of SetEvent and ResetEvent

* cspell

* clang-format

* Traces to figure out test failure

* More traces

* Another try closing the TLS cert failure window

* More atempts at improving CI

* clang-format

Co-authored-by: George Arama <50641385+gearama@users.noreply.github.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: sima-zhu <sizhu@microsoft.com>
Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com>
Co-authored-by: Mike Harder <mharder@microsoft.com>
Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
Co-authored-by: Heath Stewart <heaths@microsoft.com>
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Co-authored-by: praveenkuttappan <prmarott@microsoft.com>
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Co-authored-by: Rick Winter <rick.winter@microsoft.com>
Co-authored-by: John Heffner <john@topofcenter.net>
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: JinmingHu <jinmhu@microsoft.com>
Co-authored-by: Jonathan Cárdenas <JonathanCrd@users.noreply.github.com>
Co-authored-by: keshen-msft <53491277+keshen-msft@users.noreply.github.com>
Co-authored-by: microzchang <110015819+microzchang@users.noreply.github.com>
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
Co-authored-by: Jamie Magee <jamie.magee@microsoft.com>
Co-authored-by: Peng Li <86324823+penglimsft@users.noreply.github.com>
Co-authored-by: Peng Li <pengfeli@microsoft.com>
Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
Co-authored-by: James Suplizio <jasupliz@microsoft.com>
Co-authored-by: Victor Vazquez <victor.vazquez@microsoft.com>
Co-authored-by: Albert Cheng <albertcheng@microsoft.com>
Co-authored-by: Jeremy Meng <yumeng@microsoft.com>
2022-11-01 10:13:28 -07:00

7.0 KiB

Performance Testing

Writing a test

Adding tests , at the moment relies in making modifications in a couple of repositories.

Azure-SDK-For-Cpp repo

E.G. https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-blobs

Location

Performance tests are located under "test/perf" folder under the service folder(e.g. alongside ut folder).

The perf test folder should be added in the parent CMakeLists.txt guarded by the BUILD_PERFORMANCE_TESTS flag.

E.G.


    if(BUILD_PERFORMANCE_TESTS)
        add_subdirectory(test/perf)
    endif()

Structure

As any other CPP project you will need a CMakeLists.txt file , along side src and inc folders

Contents of the inc directory

Under inc folder create a subfolder structure following your namespace hierarchy ending with another test folder since these are in the ...Test namespace.

E.G. test/perf/inc/azure/storage/blobs/test

The tests are defined in .hpp files under this folder.

Test definition

In a .hpp file we define a class that will be contain the tests methods. The class is defined in the ::Test namespace for your service.

The class will inherit from the PerfTest base class and will override several methods as follows:

  • Constructor(Azure::Perf::TestOptions options) : PerfTest(options) Options field are passed from the perf test framework and constain the various options defined for running the test.
  • void Run(Azure::Core::Context const&) override {...}. Runs the actual test code. It is strongly recommended that the test code does as little extra work here as possible, it should consist solely of the actual test invocation. The test code should remove all assert, conditional statements ("if"/"else") or any other unnecessary work as any extra work will skew the results.
  • std::vectorAzure::Perf::TestOption GetTestOptions() override Defines the various parameters for the test run that can be passed to the test from the performance framework. The perf framework uses these params to run various combinations(e.g. blob size)
  • static Azure::Perf::TestMetadata GetTestMetadata() Returns TestMetadate object used to identify the test.

Contents of the src directory

Contains one cpp file that contains the main method defintion

    int main(int argc, char** argv)
    {
    std::cout << "SERVICE VERSION " << VCPKG_SERVICE_VERSION << std::endl;
    // Create the test list
    std::vector<Azure::Perf::TestMetadata> tests{
        Service::Namespace::Test::TestName::GetTestMetadata(),
    };
    
    Azure::Perf::Program::Run(Azure::Core::Context::ApplicationContext, tests, argc, argv);

    return 0;
    }

CMakeLists.txt

Beyond the regular cmake defintion in your cmake file make sure to add

include(AzureVcpkg)
az_vcpkg_integrate()
...
include(PerfTest)
SETPERFDEPS(azure-storage-blobs-cpp VCPKG_SERVICE_VERSION)

The crucial part here is the SETPERFDEPS cmake macro. The perf framework will set an environment variable based on the service name with the value representing a version, thus allowing to run the tests against diffrent VCPKG published versions. If the env is not defined then the test will build against the current source code of the service. There can be multiple set perf for each dependency of the service ( e.g. identity, storage).

Pipeline definition

The file should be named perf.yml, and should be located in the service directory that is to be tested, for consistency and to keep service related resources in the service folder.

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: service folder
    Services: "^service name$"
    PackageVersions: ${{ parameters.PackageVersions }}
    Tests: ${{ parameters.Tests }}
    Arguments: ${{ parameters.Arguments }}
    Iterations: ${{ parameters.Iterations }}
    AdditionalArguments: ${{ parameters.AdditionalArguments }}
    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

    EnvVars: 
      # This is set in the InstallLanguageSteps 
      VCPKG_BINARY_SOURCES_SECRET: $(VCPKG_BINARY_SOURCES_SECRET)
  

The fields of interest here are the parameters:

  • Tests which define which test s run in this pipeline ( which tests are available)
  • Arguments which allow to filter which subset of parameters are acceptable for the tests from the plurality in the framework
  • ServiceDirectory which represents the root folder of the service
  • Services which represents the services which these tests target.

Resources

If the tests require certain resources to exist beforehand the pipeline can deploy them based on the presence of the perf-resources.bicep file which will be used to deploy the required resources defined within.

Azure-SDK-Tools repo

Location

The performance automation is located under azure-sdk-tools\tools\perf-automation\Azure.Sdk.Tools.PerfAutomation folder. (https://github.com/Azure/azure-sdk-tools/tree/main/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation)

Test definition

in the above mentioned folder resided the test defintion file "tests.yml".

The tests exists in other languages

If the test exists in other languages then making the CPP version visible to the framework requires adding an entry with the name CPP under Service/Languages followed by the packages and versions available for the testing(this ties into the CMakeLists SetPerfDeps macro).

Next under the Tests/Test node with the desired name add the CPP test name. In this section mind the aArguments list , this ies with the regex in the cpp sdk pipeline.yml definition.

The test does not exist in other languages

In this case you are the first to add the required nodes. The defintion is fairly simple and straightforward.

Pipeline

Once you have everything in place create a pipeline using the definition in your in the cpp repo by going to https://dev.azure.com/azure-sdk/internal/_build?definitionScope=%5Cperf and create a new one under the cpp node.

To test intermediate definitions of your pipeline you can run the https://dev.azure.com/azure-sdk/internal/_build?definitionId=5121 pipline and set the proper values for the cpp node( make sure to deselect all other languages except cpp unless you want to run them).