azure-sdk-for-cpp/sdk/core/perf
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
..
inc/azure Sync Main branch with WebSockets branch. (#4072) 2022-11-01 10:13:28 -07:00
src Sync Main branch with WebSockets branch. (#4072) 2022-11-01 10:13:28 -07:00
test Sync Main branch with WebSockets branch. (#4072) 2022-11-01 10:13:28 -07:00
cgmanifest.json Synced websockets feature branch with main. (#3945) 2022-09-19 19:28:31 +00:00
CMakeLists.txt Adding Test-Proxy support to [Perf Fw] tests (#3257) 2022-03-11 17:13:15 -08:00
NOTICE.txt
README.md Sync Main branch with WebSockets branch. (#4072) 2022-11-01 10:13:28 -07:00

Azure SDK Perf for C++

Azure perf for C++ (azure-perf) provides shared primitives, abstractions, and helpers for running performance tests for an Azure SDK clients for C++. It represent the C++ version of the .NET original version.

Getting started

See the pre-requisites for building before going to the next step.

Build

Use the build option BUILD_PERFORMANCE_TESTS to build the test framework and all the performance tests. See the next example.

#
# Building the Performance framework and tests.
#
git clone https://github.com/Azure/azure-sdk-for-cpp.git
cd azure-sdk-for-cpp
mkdir build
cd build
cmake -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON ..
cmake --build .

Run

Once building is completed, a performance test application will be created inside the the test folder from each service SDK. For instance, the Azure core performance test application would be inside: build/sdk/core/azure-core/test/perf. See next example for running the performance framework.

#
# Running the performance framework tests application
#
# From within the build folder (build)
./sdk/core/perf/test/azure-perf-test

Note: When building the code with Windows using Visual Studio, use the CMake project view to run the performance tests. Find the tests directly in the tests folder from the cmake tree next to all other test cmake projects.

Options for running

After running the performance test application like it is mentioned above (without any command line arguments) the application will list the available test names to be run. The application will expect the test name to be executed as a mandatory argument. If the input test name is not found, the application will return an error and will terminate. The next pattern represents the right usage of the performance test application:

usage: azure-perf-test testName [options]

Note: You can use the option -h to print out the available options for a test name.

The next options can be used for any test:

Option Activators Description Default Example
Duration -d, --duration Duration of the test in seconds 10 -d 5
Host --host Host to redirect HTTP requests NA --host=https://something.com
Insecure --insecure Allow untrusted SSL certs false --insecure
Iterations -i, --iterations Number of iterations of main test loop 1 -d 5
Statistics --statistics Print job statistics false --statistics=true
Latency -l, --latency Track and print per-operation latency statistics false -l true
No Clean --noclean Disables test clean up false --nocleanup=true
Parallel -p, --parallel Number of operations to execute in parallel 1 -p 5
Port --port Port to redirect HTTP requests NA --port=5000
Rate -r, --rate Target throughput (ops/sec) NA -r 3000
Warm up -w, --warmup Duration of warmup in seconds 5 -w 0 (no warm up)

Creating a perf test

Find below how to create a new CMake performance test project from scratch to an existing CMake project. Then how to add the performance tests to it.

The CMake project

The main CMake project represents the definition of the main performance test application. It defines the name of the binary to be produced and the libraries to be linked to it. The recommended folder where this project should be is inside the test folder from a service package (i.e. sdk/core/azure-core/test/performance).

Follow the next template to create the main CMake project

# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT

# Configure CMake project.
cmake_minimum_required (VERSION 3.13)
project(provide-a-project-name-here LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# Name the binary to be created.
add_executable (
  azure-performance-library-name-test
    src/main.cpp
)

# Include the headers from the project.
target_include_directories(
  azure-performance-library-name-test
    PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
)

# link the `azure-perf` lib together with any other library which will be used for the tests. Below example is using azure-core only.
target_link_libraries(azure-performance-library-name-test PRIVATE azure-core azure-perf)
# Make sure the project will appear in the test folder for Visual Studio CMake view
set_target_properties(azure-performance-library-name-test PROPERTIES FOLDER "Tests")

Notes:

  • Create the src and inc folders.
  • Add a main.cpp file to the src folder.

The main.cpp

The main source file defines the list of available tests and calls the performance framework Run function. Take a loop to the next example.

// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: MIT

// The performance framework headers
#include <azure/perf/options.hpp>
#include <azure/perf/program.hpp>

// The test definition headers
#include "azure/perf/test/extended_options.hpp"
#include "azure/perf/test/no_op_test.hpp"

// The utilities
#include <functional>
#include <iostream>
#include <map>

int main(int argc, char** argv)
{

  /**
   * The test list is a dictionary with the name of the test as a key and
   * an std::function to define how to instantiate a new Test for the PerfTest
   * interface.
   *
   * In the next example, a map called `tests` is init with two test definitions.
   *
   **/
  std::map<
      std::string,
      std::function<std::unique_ptr<Azure::Perf::PerfTest>(
          Azure::Perf::TestOptions)>>
      tests{
          {"noOp", // Test Name
           [](Azure::Perf::TestOptions options) {
             // No Op test
             return std::make_unique<Azure::Perf::Test::NoOp>(options);
           }},
          {"extendedOptions", // Test Name
            [](Azure::Perf::TestOptions options) {
             // Extended options test
             return std::make_unique<Azure::Perf::Test::ExtendedOptionsTest>(options);
           }}};

  // Call the `Run` method with a context, the tests and the application arguments to launch the program.
  Azure::Perf::Program::Run(Azure::Core::Context::ApplicationContext, tests, argc, argv);

  return 0;
}

The Run method from the performance framework will parse the command line arguments to find out the test name to be run. Then it will try to get that test name from the tests map. If the test is found, the framework will get any extra options defined in the test and parse it from the command line arguments. Then it uses the std::function to create a as many instances of the test as the parallel option value.

In the above code example, the two tests added to the map are defined in the project headers. Each test is defined in its own header. See below example for how to define a test.

Create a performance test

The next code example illustrates how to define a very simple empty test.

// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: MIT

/**
 * @file
 * @brief Define an empty test.
 *
 */

#pragma once

// The performance framework headers
#include <azure/perf/options.hpp>
#include <azure/perf/test.hpp>

// Use a namespace according to the service package
namespace Azure { namespace Perf { namespace Test {

  // Define a derived class from a PerfTest
  class NoOp : public Azure::Perf::PerfTest {
  public:

    // Define a constructor to take TestOptions and use the options for the
    // PerfTest constructor.
    NoOp(Azure::Perf::TestOptions options) : PerfTest(options) {}

    // Override the `Run` method with the test definition
    void Run(Azure::Core::Context const& ctx) override {
      (void)ctx;
    }
  };

}}} // namespace Azure::Perf::Test

Create a performance test with options

A test can define its own options as an addition to the base options from the performance framework. See the next example to learn how to do it.

// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: MIT

/**
 * @file
 * @brief An example of a performance test that defines a test option.
 *
 */

#pragma once

// The performance framework headers
#include <azure/perf/options.hpp>
#include <azure/perf/test.hpp>
#include <azure/perf/test_options.hpp>

// Utilities
#include <vector>

namespace Azure { namespace Perf { namespace Test {

  // The test class definition and constructor looks just the same as any
  // other test (with or without extended options).
  class ExtendedOptionsTest : public Azure::Perf::PerfTest {
  public:

    ExtendedOptionsTest(Azure::Perf::TestOptions options) : PerfTest(options) {}

    // Override the `GetTestOptions` function to define the unique test options.
    // Do not duplicate activators or test names or the application will fail during parsing.
    std::vector<Azure::Perf::TestOption> GetTestOptions() override
    {
      // Each test option is define by 4 properties:
      // - Name (string)
      // - Activators (array of strings which must starts with `-` or `--`)
      // - Description (string that will be use for the help message on console)
      // - Expected Arguments (int to define how many arguments are expected after the activator)
      return {{"extraOption", {"-e"}, "Example for extended option for test.", 1}};
    }

    // Use the `m_options.GetOptionsOrDefault` function inside the test definition to get
    // the test options.
    void Run(Azure::Core::Context const& ctx) override
    {
      // Get a defined test option.
      auto myTestOption = m_options.GetOptionOrDefault("extraOption", 0);
      (void)ctx;
      (void)myTestOption;
    }
  };

}}} // namespace Azure::Perf::Test

Contributing

For details on contributing to this repository, see the [contributing guide][azure_sdk_for_cpp_contributing].

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Many people all over the world have helped make this project better. You'll want to check out:

Reporting security issues and security bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

License

Azure SDK for C++ is licensed under the MIT license.