From a97c7b80cf287304325a6a11580308b2f4fbff44 Mon Sep 17 00:00:00 2001 From: Timo van Veenendaal Date: Tue, 19 Oct 2021 16:50:23 -0700 Subject: [PATCH] [Perf Framework] rename PerfStress to Perf (#18033) --- common/config/rush/pnpm-lock.yaml | 10 +-- common/tools/perf-tests-track-1-setup.js | 12 ++-- dataplane.code-workspace | 4 +- eng/tools/rush-runner.js | 2 +- rush.json | 6 +- .../perf-tests/app-configuration/package.json | 2 +- .../test/appConfigBase.spec.ts | 4 +- .../app-configuration/test/index.spec.ts | 8 +-- .../test/listSettings.spec.ts | 4 +- .../container-registry/package.json | 2 +- .../container-registry/test/client.spec.ts | 4 +- .../container-registry/test/index.spec.ts | 10 +-- .../test/listArtifacts.spec.ts | 4 +- .../test/listRepositories.spec.ts | 4 +- .../core-rest-pipeline/package.json | 2 +- .../wwwChallenge.spec.ts | 4 +- .../core-rest-pipeline/test/index.spec.ts | 10 +-- .../perf-tests/eventgrid/package.json | 2 +- .../perf-tests/eventgrid/test/index.spec.ts | 8 +-- .../eventgrid/test/sendCloudEvents.spec.ts | 10 +-- sdk/eventhub/event-hubs/package.json | 2 +- .../perf-tests/event-hubs-track-1/README.md | 2 +- .../event-hubs-track-1/package.json | 2 +- .../event-hubs-track-1/test/index.spec.ts | 8 +-- .../event-hubs-track-1/test/receive.spec.ts | 2 +- .../event-hubs-track-1/test/send.spec.ts | 10 +-- sdk/eventhub/perf-tests/event-hubs/README.md | 2 +- .../perf-tests/event-hubs/package.json | 2 +- .../perf-tests/event-hubs/test/index.spec.ts | 8 +-- .../event-hubs/test/receive.spec.ts | 2 +- .../perf-tests/event-hubs/test/send.spec.ts | 10 +-- .../ai-form-recognizer/package.json | 2 +- .../ai-form-recognizer/test/custom.spec.ts | 10 +-- .../ai-form-recognizer/test/index.spec.ts | 8 +-- sdk/identity/perf-tests/identity/package.json | 2 +- .../persistence.spec.ts | 4 +- .../perf-tests/identity/test/index.spec.ts | 10 +-- .../keyvault-certificates/package.json | 2 +- .../test/getCertificate.spec.ts | 4 +- .../keyvault-certificates/test/index.spec.ts | 8 +-- .../keyvault-certificates/test/utils.ts | 2 +- .../perf-tests/keyvault-keys/package.json | 2 +- .../test/cryptography/cryptography.spec.ts | 6 +- .../keyvault-keys/test/index.spec.ts | 10 +-- .../keyvault-keys/test/keys/get.spec.ts | 6 +- .../perf-tests/keyvault-keys/test/utils.ts | 2 +- .../perf-tests/keyvault-secrets/package.json | 2 +- .../keyvault-secrets/test/index.spec.ts | 10 +-- .../keyvault-secrets/test/listSecrets.spec.ts | 4 +- .../keyvault-secrets/test/secretTest.ts | 4 +- .../perf-tests/keyvault-secrets/test/utils.ts | 2 +- .../ai-metrics-advisor/package.json | 2 +- .../ai-metrics-advisor/test/index.spec.ts | 10 +-- .../test/listAnomalies.spec.ts | 4 +- .../test/listIncidents.spec.ts | 4 +- .../test/metricsAdvisor.spec.ts | 4 +- .../test/rootCauses.spec.ts | 4 +- .../perf-tests/monitor-query/package.json | 2 +- .../monitor-query/test/index.spec.ts | 10 +-- .../monitor-query/test/logQuery.spec.ts | 4 +- .../monitor-query/test/logQueryBatch.spec.ts | 4 +- .../monitor-query/test/metricQuery.spec.ts | 4 +- .../test/monitorQueryLog.spec.ts | 4 +- .../test/monitorQueryMetrics.spec.ts | 4 +- .../perf-tests/search-documents/package.json | 2 +- .../test/autoCompleteTest.spec.ts | 4 +- .../test/core/searchDocumentsBase.spec.ts | 4 +- .../search-documents/test/index.spec.ts | 10 +-- .../test/indexDocumentsTest.spec.ts | 4 +- .../test/searchDocumentsTest.spec.ts | 4 +- .../search-documents/test/suggestTest.spec.ts | 4 +- .../perf-tests/service-bus-track-1/README.md | 2 +- .../service-bus-track-1/package.json | 2 +- .../service-bus-track-1/test/index.spec.ts | 8 +-- .../service-bus-track-1/test/sbBase.spec.ts | 4 +- .../test/sendBatch.spec.ts | 4 +- .../perf-tests/service-bus/README.md | 2 +- .../perf-tests/service-bus/package.json | 2 +- .../perf-tests/service-bus/test/index.spec.ts | 8 +-- .../service-bus/test/sbBase.spec.ts | 4 +- .../service-bus/test/sendBatch.spec.ts | 4 +- sdk/servicebus/service-bus/package.json | 2 +- .../storage-blob-track-1/package.json | 2 +- .../test/download.spec.ts | 4 +- .../storage-blob-track-1/test/index.spec.ts | 10 +-- .../test/listBlobs.spec.ts | 4 +- .../test/storageTest.spec.ts | 4 +- .../storage-blob-track-1/test/upload.spec.ts | 4 +- .../perf-tests/storage-blob/package.json | 2 +- .../storage-blob/test/core-http.spec.ts | 2 +- .../test/core-rest-pipeline.spec.ts | 2 +- .../storage-blob/test/dowloadWithSAS.spec.ts | 4 +- .../storage-blob/test/download.spec.ts | 4 +- .../storage-blob/test/index.spec.ts | 10 +-- .../storage-blob/test/listBlobs.spec.ts | 4 +- .../storage-blob/test/node-fetch.spec.ts | 2 +- .../storage-blob/test/storageTest.spec.ts | 4 +- .../storage-blob/test/upload.spec.ts | 4 +- .../storage-file-datalake/package.json | 2 +- .../storage-file-datalake/test/append.spec.ts | 4 +- .../storage-file-datalake/test/index.spec.ts | 10 +-- .../storage-file-datalake/test/read.spec.ts | 4 +- .../test/storageTest.spec.ts | 4 +- .../storage-file-datalake/test/upload.spec.ts | 4 +- .../storage-file-share-track-1/package.json | 2 +- .../test/download.spec.ts | 4 +- .../test/index.spec.ts | 10 +-- .../test/storageTest.ts | 4 +- .../test/upload.spec.ts | 4 +- .../storage-file-share/package.json | 2 +- .../storage-file-share/test/download.spec.ts | 4 +- .../test/downloadToFile.spec.ts | 4 +- .../storage-file-share/test/index.spec.ts | 10 +-- .../test/storageTest.spec.ts | 4 +- .../storage-file-share/test/upload.spec.ts | 4 +- .../test/uploadFromFile.spec.ts | 4 +- sdk/storage/storage-blob/package.json | 2 +- sdk/storage/storage-blob/tsconfig.json | 2 +- .../storage-file-datalake/package.json | 2 +- sdk/storage/storage-file-share/package.json | 2 +- .../perf-tests/data-tables/package.json | 2 +- .../test/createComplexEntity.spec.ts | 4 +- .../test/createComplexEntityBatchTest.spec.ts | 4 +- .../test/createSimpleEntity.spec.ts | 4 +- .../test/createSimpleEntityBatchTest.spec.ts | 4 +- .../perf-tests/data-tables/test/index.spec.ts | 10 +-- .../test/listComplexEntities.spec.ts | 4 +- .../test/listSimpleEntities.spec.ts | 4 +- .../data-tables/test/tables.spec.ts | 4 +- .../{perfstress => perf}/.dockerignore | 0 .../{perfstress => perf}/CHANGELOG.md | 6 +- .../{perfstress => perf}/Dockerfile | 0 .../{perfstress => perf}/GettingStarted.md | 28 ++++----- sdk/test-utils/{perfstress => perf}/LICENSE | 0 sdk/test-utils/{perfstress => perf}/README.md | 20 +++--- sdk/test-utils/perf/build.ps1 | 3 + .../{perfstress => perf}/karma.conf.js | 0 .../{perfstress => perf}/package.json | 6 +- sdk/test-utils/perf/run.ps1 | 3 + .../{perfstress => perf}/runAllTests.sh | 2 +- .../{perfstress => perf}/src/index.ts | 0 .../{perfstress => perf}/src/options.ts | 28 ++++----- .../{perfstress => perf}/src/parallel.ts | 4 +- .../{perfstress => perf}/src/policy.ts | 2 +- .../{perfstress => perf}/src/program.ts | 62 +++++++++---------- .../src/testProxyHttpClient.ts | 0 .../{perfstress => perf}/src/tests.ts | 48 +++++++------- .../{perfstress => perf}/src/utils.ts | 0 .../{perfstress => perf}/test/delay.spec.ts | 6 +- .../test/exception.spec.ts | 6 +- .../{perfstress => perf}/test/index.spec.ts | 14 ++--- .../test/nodeFetch.spec.ts | 6 +- sdk/test-utils/perf/test/noop.spec.ts | 13 ++++ .../{perfstress => perf}/test/options.spec.ts | 8 +-- .../test/perfPolicy.spec.ts} | 12 ++-- .../test/serviceClientGet.spec.ts | 6 +- .../test/setupCleanup.spec.ts | 8 +-- .../{perfstress => perf}/test/sleep.spec.ts | 4 +- .../{perfstress => perf}/tsconfig.json | 0 sdk/test-utils/perfstress/build.ps1 | 3 - sdk/test-utils/perfstress/run.ps1 | 3 - sdk/test-utils/perfstress/test/noop.spec.ts | 13 ---- .../perf-tests/text-analytics/package.json | 2 +- .../test/detectLanguage.spec.ts | 10 +-- .../text-analytics/test/index.spec.ts | 8 +-- 165 files changed, 464 insertions(+), 464 deletions(-) rename sdk/test-utils/{perfstress => perf}/.dockerignore (100%) rename sdk/test-utils/{perfstress => perf}/CHANGELOG.md (84%) rename sdk/test-utils/{perfstress => perf}/Dockerfile (100%) rename sdk/test-utils/{perfstress => perf}/GettingStarted.md (93%) rename sdk/test-utils/{perfstress => perf}/LICENSE (100%) rename sdk/test-utils/{perfstress => perf}/README.md (64%) create mode 100644 sdk/test-utils/perf/build.ps1 rename sdk/test-utils/{perfstress => perf}/karma.conf.js (100%) rename sdk/test-utils/{perfstress => perf}/package.json (94%) create mode 100644 sdk/test-utils/perf/run.ps1 rename sdk/test-utils/{perfstress => perf}/runAllTests.sh (84%) rename sdk/test-utils/{perfstress => perf}/src/index.ts (100%) rename sdk/test-utils/{perfstress => perf}/src/options.ts (85%) rename sdk/test-utils/{perfstress => perf}/src/parallel.ts (94%) rename sdk/test-utils/{perfstress => perf}/src/policy.ts (96%) rename sdk/test-utils/{perfstress => perf}/src/program.ts (89%) rename sdk/test-utils/{perfstress => perf}/src/testProxyHttpClient.ts (100%) rename sdk/test-utils/{perfstress => perf}/src/tests.ts (75%) rename sdk/test-utils/{perfstress => perf}/src/utils.ts (100%) rename sdk/test-utils/{perfstress => perf}/test/delay.spec.ts (89%) rename sdk/test-utils/{perfstress => perf}/test/exception.spec.ts (74%) rename sdk/test-utils/{perfstress => perf}/test/index.spec.ts (66%) rename sdk/test-utils/{perfstress => perf}/test/nodeFetch.spec.ts (77%) create mode 100644 sdk/test-utils/perf/test/noop.spec.ts rename sdk/test-utils/{perfstress => perf}/test/options.spec.ts (90%) rename sdk/test-utils/{perfstress/test/perfStressPolicy.spec.ts => perf/test/perfPolicy.spec.ts} (81%) rename sdk/test-utils/{perfstress => perf}/test/serviceClientGet.spec.ts (88%) rename sdk/test-utils/{perfstress => perf}/test/setupCleanup.spec.ts (84%) rename sdk/test-utils/{perfstress => perf}/test/sleep.spec.ts (90%) rename sdk/test-utils/{perfstress => perf}/tsconfig.json (100%) delete mode 100644 sdk/test-utils/perfstress/build.ps1 delete mode 100644 sdk/test-utils/perfstress/run.ps1 delete mode 100644 sdk/test-utils/perfstress/test/noop.spec.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 34a8029b1c84..88f76545e5da 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -128,7 +128,7 @@ specifiers: '@rush-temp/test-recorder': file:./projects/test-recorder.tgz '@rush-temp/test-recorder-new': file:./projects/test-recorder-new.tgz '@rush-temp/test-utils': file:./projects/test-utils.tgz - '@rush-temp/test-utils-perfstress': file:./projects/test-utils-perfstress.tgz + '@rush-temp/test-utils-perf': file:./projects/test-utils-perf.tgz '@rush-temp/testing-recorder-new': file:./projects/testing-recorder-new.tgz '@rush-temp/video-analyzer-edge': file:./projects/video-analyzer-edge.tgz '@rush-temp/web-pubsub': file:./projects/web-pubsub.tgz @@ -262,7 +262,7 @@ dependencies: '@rush-temp/test-recorder': file:projects/test-recorder.tgz '@rush-temp/test-recorder-new': file:projects/test-recorder-new.tgz '@rush-temp/test-utils': file:projects/test-utils.tgz - '@rush-temp/test-utils-perfstress': file:projects/test-utils-perfstress.tgz + '@rush-temp/test-utils-perf': file:projects/test-utils-perf.tgz '@rush-temp/testing-recorder-new': file:projects/testing-recorder-new.tgz '@rush-temp/video-analyzer-edge': file:projects/video-analyzer-edge.tgz '@rush-temp/web-pubsub': file:projects/web-pubsub.tgz @@ -13179,9 +13179,9 @@ packages: - utf-8-validate dev: false - file:projects/test-utils-perfstress.tgz: - resolution: {integrity: sha512-RYaN04zHouUgjzQ9x25yRE/XBAnAIADGNe1Th5m6lgEXeohWPorl+nFH3cqS5LdppUoTXnif5cL5Im0gwZ1YUA==, tarball: file:projects/test-utils-perfstress.tgz} - name: '@rush-temp/test-utils-perfstress' + file:projects/test-utils-perf.tgz: + resolution: {integrity: sha512-RYaN04zHouUgjzQ9x25yRE/XBAnAIADGNe1Th5m6lgEXeohWPorl+nFH3cqS5LdppUoTXnif5cL5Im0gwZ1YUA==, tarball: file:projects/test-utils-perf.tgz} + name: '@rush-temp/test-utils-perf' version: 0.0.0 dependencies: '@types/minimist': 1.2.2 diff --git a/common/tools/perf-tests-track-1-setup.js b/common/tools/perf-tests-track-1-setup.js index 25d3348612e2..3c8b95aa5f18 100644 --- a/common/tools/perf-tests-track-1-setup.js +++ b/common/tools/perf-tests-track-1-setup.js @@ -5,7 +5,7 @@ * Track 1 perf tests are not maintained through rush in this repository. * * This helper script is meant to be used to "build" and "install" - * the `@azure/test-utils-perfstress` package in the track-1 perf-test projects + * the `@azure/test-utils-perf` package in the track-1 perf-test projects * so that the track 1 perf tests can leverage the perf framework. * * Additionally, this runs `npm install` in the track-1 perf test projects. @@ -21,18 +21,18 @@ function spawn(command) { } } -const navigateToPerfStressFolder = `cd ${path.resolve( +const navigateToPerfFolder = `cd ${path.resolve( "..", "..", "..", "test-utils", - "perfstress" + "perf" )}`; -const buildPerfStressPackage = `rush build -t test-utils-perfstress`; +const buildPerfPackage = `rush build -t test-utils-perf`; const rushxPack = `rushx pack`; -console.log(`\nGetting perfstress package...`); -spawn(`${navigateToPerfStressFolder} && ${buildPerfStressPackage} && ${rushxPack}`); +console.log(`\nGetting perf package...`); +spawn(`${navigateToPerfFolder} && ${buildPerfPackage} && ${rushxPack}`); console.log(`\nRunning "npm install"...`); spawn(`npm install`); diff --git a/dataplane.code-workspace b/dataplane.code-workspace index bb9154de271b..1c607eb9cec0 100644 --- a/dataplane.code-workspace +++ b/dataplane.code-workspace @@ -253,8 +253,8 @@ "path": "sdk/purview/purview-scanning-rest" }, { - "name": "perfstress", - "path": "sdk/test-utils/perfstress" + "name": "perf", + "path": "sdk/test-utils/perf" }, { "name": "multi-version test", diff --git a/eng/tools/rush-runner.js b/eng/tools/rush-runner.js index 010b8519b492..b6466ffe0e39 100644 --- a/eng/tools/rush-runner.js +++ b/eng/tools/rush-runner.js @@ -19,7 +19,7 @@ const reducedDependencyTestMatrix = { '@azure/storage-blob', '@azure/template', '@azure/test-utils', - '@azure/test-utils-perfstress', + '@azure/test-utils-perf', '@azure-tools/test-recorder', '@azure/synapse-monitoring' ], diff --git a/rush.json b/rush.json index 3329c0d8e9aa..ef8df819037d 100644 --- a/rush.json +++ b/rush.json @@ -712,8 +712,8 @@ "versionPolicyName": "utility" }, { - "packageName": "@azure/test-utils-perfstress", - "projectFolder": "sdk/test-utils/perfstress", + "packageName": "@azure/test-utils-perf", + "projectFolder": "sdk/test-utils/perf", "versionPolicyName": "utility" }, { @@ -982,4 +982,4 @@ "versionPolicyName": "management" } ] -} \ No newline at end of file +} diff --git a/sdk/appconfiguration/perf-tests/app-configuration/package.json b/sdk/appconfiguration/perf-tests/app-configuration/package.json index 9ce156db3a57..7b6971919670 100644 --- a/sdk/appconfiguration/perf-tests/app-configuration/package.json +++ b/sdk/appconfiguration/perf-tests/app-configuration/package.json @@ -10,7 +10,7 @@ "dependencies": { "@azure/app-configuration": "^1.2.0-beta.2", "@azure/core-http": "^2.0.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0" }, "devDependencies": { diff --git a/sdk/appconfiguration/perf-tests/app-configuration/test/appConfigBase.spec.ts b/sdk/appconfiguration/perf-tests/app-configuration/test/appConfigBase.spec.ts index cf6eaa5b22b6..508272cf441b 100644 --- a/sdk/appconfiguration/perf-tests/app-configuration/test/appConfigBase.spec.ts +++ b/sdk/appconfiguration/perf-tests/app-configuration/test/appConfigBase.spec.ts @@ -1,10 +1,10 @@ -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { AppConfigurationClient } from "@azure/app-configuration"; // Expects the .env file at the same level import * as dotenv from "dotenv"; dotenv.config(); -export abstract class AppConfigTest extends PerfStressTest { +export abstract class AppConfigTest extends PerfTest { client: AppConfigurationClient; constructor() { diff --git a/sdk/appconfiguration/perf-tests/app-configuration/test/index.spec.ts b/sdk/appconfiguration/perf-tests/app-configuration/test/index.spec.ts index 9ba6ac840be0..087f8d6ab71b 100644 --- a/sdk/appconfiguration/perf-tests/app-configuration/test/index.spec.ts +++ b/sdk/appconfiguration/perf-tests/app-configuration/test/index.spec.ts @@ -1,8 +1,8 @@ -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { ListSettingsTest } from "./listSettings.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram(selectPerfStressTest([ListSettingsTest])); +const perfProgram = new PerfProgram(selectPerfTest([ListSettingsTest])); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/appconfiguration/perf-tests/app-configuration/test/listSettings.spec.ts b/sdk/appconfiguration/perf-tests/app-configuration/test/listSettings.spec.ts index e0090e0594e1..520039664243 100644 --- a/sdk/appconfiguration/perf-tests/app-configuration/test/listSettings.spec.ts +++ b/sdk/appconfiguration/perf-tests/app-configuration/test/listSettings.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { generateUuid } from "@azure/core-http"; -import { PerfStressOptionDictionary, executeParallel } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, executeParallel } from "@azure/test-utils-perf"; import { AppConfigTest } from "./appConfigBase.spec"; interface ListTestOptions { @@ -14,7 +14,7 @@ interface ListTestOptions { export class ListSettingsTest extends AppConfigTest { static prefix = generateUuid(); - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { count: { required: true, description: "Number of settings to be listed", diff --git a/sdk/containerregistry/perf-tests/container-registry/package.json b/sdk/containerregistry/perf-tests/container-registry/package.json index e47ff5e90396..7b64e8777019 100644 --- a/sdk/containerregistry/perf-tests/container-registry/package.json +++ b/sdk/containerregistry/perf-tests/container-registry/package.json @@ -8,7 +8,7 @@ "license": "ISC", "dependencies": { "@azure/container-registry": "1.0.0-beta.4", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0" }, "devDependencies": { diff --git a/sdk/containerregistry/perf-tests/container-registry/test/client.spec.ts b/sdk/containerregistry/perf-tests/container-registry/test/client.spec.ts index 831230932453..72fd25f6984e 100644 --- a/sdk/containerregistry/perf-tests/container-registry/test/client.spec.ts +++ b/sdk/containerregistry/perf-tests/container-registry/test/client.spec.ts @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { ContainerRegistryClient } from "@azure/container-registry"; // Expects the .env file at the same level import * as dotenv from "dotenv"; dotenv.config(); -export abstract class ContainerRegistryTest extends PerfStressTest { +export abstract class ContainerRegistryTest extends PerfTest { client: ContainerRegistryClient; constructor() { diff --git a/sdk/containerregistry/perf-tests/container-registry/test/index.spec.ts b/sdk/containerregistry/perf-tests/container-registry/test/index.spec.ts index fdf388643370..1fdd8d5777f2 100644 --- a/sdk/containerregistry/perf-tests/container-registry/test/index.spec.ts +++ b/sdk/containerregistry/perf-tests/container-registry/test/index.spec.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { ArtifactListTest } from "./listArtifacts.spec"; import { RepositoryListTest } from "./listRepositories.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([RepositoryListTest, ArtifactListTest]) +const perfProgram = new PerfProgram( + selectPerfTest([RepositoryListTest, ArtifactListTest]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/containerregistry/perf-tests/container-registry/test/listArtifacts.spec.ts b/sdk/containerregistry/perf-tests/container-registry/test/listArtifacts.spec.ts index dcdcd7d99d1a..f7af781734eb 100644 --- a/sdk/containerregistry/perf-tests/container-registry/test/listArtifacts.spec.ts +++ b/sdk/containerregistry/perf-tests/container-registry/test/listArtifacts.spec.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, getEnvVar } from "@azure/test-utils-perf"; import { ContainerRepository } from "@azure/container-registry"; import { ContainerRegistryTest, ContainerRegistryTestOptions } from "./client.spec"; export class ArtifactListTest extends ContainerRegistryTest { repository: ContainerRepository; - public options: PerfStressOptionDictionary = {}; + public options: PerfOptionDictionary = {}; constructor() { super(); this.repository = this.client.getRepository(getEnvVar("REPOSITORY_NAME")); diff --git a/sdk/containerregistry/perf-tests/container-registry/test/listRepositories.spec.ts b/sdk/containerregistry/perf-tests/container-registry/test/listRepositories.spec.ts index 945f83a488bc..727168526767 100644 --- a/sdk/containerregistry/perf-tests/container-registry/test/listRepositories.spec.ts +++ b/sdk/containerregistry/perf-tests/container-registry/test/listRepositories.spec.ts @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { ContainerRegistryTest, ContainerRegistryTestOptions } from "./client.spec"; export class RepositoryListTest extends ContainerRegistryTest { - public options: PerfStressOptionDictionary = {}; + public options: PerfOptionDictionary = {}; constructor() { super(); } diff --git a/sdk/core/perf-tests/core-rest-pipeline/package.json b/sdk/core/perf-tests/core-rest-pipeline/package.json index 42c07e3f5e70..fea6e8ed1aef 100644 --- a/sdk/core/perf-tests/core-rest-pipeline/package.json +++ b/sdk/core/perf-tests/core-rest-pipeline/package.json @@ -10,7 +10,7 @@ "dependencies": { "@azure/core-rest-pipeline": "^1.1.0", "@azure/core-auth": "^1.3.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0" }, "devDependencies": { diff --git a/sdk/core/perf-tests/core-rest-pipeline/test/bearerTokenChallengeAuthenticationPolicy/wwwChallenge.spec.ts b/sdk/core/perf-tests/core-rest-pipeline/test/bearerTokenChallengeAuthenticationPolicy/wwwChallenge.spec.ts index 5eb1e1b7e085..1139109baf0c 100644 --- a/sdk/core/perf-tests/core-rest-pipeline/test/bearerTokenChallengeAuthenticationPolicy/wwwChallenge.spec.ts +++ b/sdk/core/perf-tests/core-rest-pipeline/test/bearerTokenChallengeAuthenticationPolicy/wwwChallenge.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfTest } from "@azure/test-utils-perf"; import { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth"; import { AuthorizeRequestOnChallengeOptions, @@ -116,7 +116,7 @@ class MockRefreshAzureCredential implements TokenCredential { } } -export class BearerTokenAuthenticationPolicyChallengeTest extends PerfStressTest { +export class BearerTokenAuthenticationPolicyChallengeTest extends PerfTest { options = {}; constructor() { diff --git a/sdk/core/perf-tests/core-rest-pipeline/test/index.spec.ts b/sdk/core/perf-tests/core-rest-pipeline/test/index.spec.ts index f6c417937aa8..83a586fd3415 100644 --- a/sdk/core/perf-tests/core-rest-pipeline/test/index.spec.ts +++ b/sdk/core/perf-tests/core-rest-pipeline/test/index.spec.ts @@ -1,10 +1,10 @@ -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { BearerTokenAuthenticationPolicyChallengeTest } from "./bearerTokenChallengeAuthenticationPolicy/wwwChallenge.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([BearerTokenAuthenticationPolicyChallengeTest]) +const perfProgram = new PerfProgram( + selectPerfTest([BearerTokenAuthenticationPolicyChallengeTest]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/eventgrid/perf-tests/eventgrid/package.json b/sdk/eventgrid/perf-tests/eventgrid/package.json index b4c70b8122d3..a6f16d219c07 100644 --- a/sdk/eventgrid/perf-tests/eventgrid/package.json +++ b/sdk/eventgrid/perf-tests/eventgrid/package.json @@ -9,7 +9,7 @@ "license": "ISC", "dependencies": { "@azure/eventgrid": "^4.0.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0" }, "devDependencies": { diff --git a/sdk/eventgrid/perf-tests/eventgrid/test/index.spec.ts b/sdk/eventgrid/perf-tests/eventgrid/test/index.spec.ts index a888bdc12699..a1fc9457ea5a 100644 --- a/sdk/eventgrid/perf-tests/eventgrid/test/index.spec.ts +++ b/sdk/eventgrid/perf-tests/eventgrid/test/index.spec.ts @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { SendCloudEventsTest } from "./sendCloudEvents.spec"; import dotenv from "dotenv"; dotenv.config(); -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram(selectPerfStressTest([SendCloudEventsTest])); +const perfProgram = new PerfProgram(selectPerfTest([SendCloudEventsTest])); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/eventgrid/perf-tests/eventgrid/test/sendCloudEvents.spec.ts b/sdk/eventgrid/perf-tests/eventgrid/test/sendCloudEvents.spec.ts index b0130d10338a..b8a2b4208c28 100644 --- a/sdk/eventgrid/perf-tests/eventgrid/test/sendCloudEvents.spec.ts +++ b/sdk/eventgrid/perf-tests/eventgrid/test/sendCloudEvents.spec.ts @@ -2,10 +2,10 @@ // Licensed under the MIT license. import { - PerfStressTest, - PerfStressOptionDictionary, + PerfTest, + PerfOptionDictionary, getEnvVar -} from "@azure/test-utils-perfstress"; +} from "@azure/test-utils-perf"; import { EventGridPublisherClient, AzureKeyCredential, @@ -16,8 +16,8 @@ interface SendCloudEventsPerfTestOptions { "event-count": number; } -export class SendCloudEventsTest extends PerfStressTest { - options: PerfStressOptionDictionary = { +export class SendCloudEventsTest extends PerfTest { + options: PerfOptionDictionary = { "event-count": { required: true, description: "Number of events to send in a single request", diff --git a/sdk/eventhub/event-hubs/package.json b/sdk/eventhub/event-hubs/package.json index 6e2de4f2975a..f2a6a4f93aa5 100644 --- a/sdk/eventhub/event-hubs/package.json +++ b/sdk/eventhub/event-hubs/package.json @@ -130,7 +130,7 @@ "@azure/identity": "2.0.0-beta.6", "@azure/mock-hub": "^1.0.0", "@azure/test-utils": "^1.0.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "@microsoft/api-extractor": "^7.18.11", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-inject": "^4.0.0", diff --git a/sdk/eventhub/perf-tests/event-hubs-track-1/README.md b/sdk/eventhub/perf-tests/event-hubs-track-1/README.md index 599dc7c6d5b1..711d0d6c6625 100644 --- a/sdk/eventhub/perf-tests/event-hubs-track-1/README.md +++ b/sdk/eventhub/perf-tests/event-hubs-track-1/README.md @@ -20,7 +20,7 @@ Create an event-hubs namespace and populate the `.env` file with the following v > npm run perf-test:node -- SendTest --warmup 2 --duration 7 --parallel 2 - _Note: For more default options, refer [Perf-Framework-Default-Options](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perfstress/README.md#keyconcepts)._ + _Note: For more default options, refer [Perf-Framework-Default-Options](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perf/README.md#keyconcepts)._ - To test receiving messages (this test does not use the framework, is a standalone test) diff --git a/sdk/eventhub/perf-tests/event-hubs-track-1/package.json b/sdk/eventhub/perf-tests/event-hubs-track-1/package.json index 6ed0035a64fa..50561ac3605e 100644 --- a/sdk/eventhub/perf-tests/event-hubs-track-1/package.json +++ b/sdk/eventhub/perf-tests/event-hubs-track-1/package.json @@ -10,7 +10,7 @@ "@azure/core-amqp": "^3.0.0", "@azure/event-hubs": "^2.1.4", "uuid": "^8.3.0", - "@azure/test-utils-perfstress": "file:../../../test-utils/perfstress/azure-test-utils-perfstress-1.0.0.tgz", + "@azure/test-utils-perf": "file:../../../test-utils/perf/azure-test-utils-perf-1.0.0.tgz", "dotenv": "^8.2.0", "moment": "^2.24.0" }, diff --git a/sdk/eventhub/perf-tests/event-hubs-track-1/test/index.spec.ts b/sdk/eventhub/perf-tests/event-hubs-track-1/test/index.spec.ts index a72d02ad71eb..febad3a8522d 100644 --- a/sdk/eventhub/perf-tests/event-hubs-track-1/test/index.spec.ts +++ b/sdk/eventhub/perf-tests/event-hubs-track-1/test/index.spec.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { SendTest } from "./send.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram(selectPerfStressTest([SendTest])); +const perfProgram = new PerfProgram(selectPerfTest([SendTest])); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/eventhub/perf-tests/event-hubs-track-1/test/receive.spec.ts b/sdk/eventhub/perf-tests/event-hubs-track-1/test/receive.spec.ts index 7fc2d6b4de62..10b604d6225f 100644 --- a/sdk/eventhub/perf-tests/event-hubs-track-1/test/receive.spec.ts +++ b/sdk/eventhub/perf-tests/event-hubs-track-1/test/receive.spec.ts @@ -12,7 +12,7 @@ Measures the maximum throughput of `receiver.receive()` in package `@azure/event */ import { EventHubClient, EventPosition, EventData } from "@azure/event-hubs"; -import { getEnvVar } from "@azure/test-utils-perfstress"; +import { getEnvVar } from "@azure/test-utils-perf"; import moment from "moment"; import { delay } from "@azure/core-amqp"; diff --git a/sdk/eventhub/perf-tests/event-hubs-track-1/test/send.spec.ts b/sdk/eventhub/perf-tests/event-hubs-track-1/test/send.spec.ts index 370186e2cab4..b37440f4af4c 100644 --- a/sdk/eventhub/perf-tests/event-hubs-track-1/test/send.spec.ts +++ b/sdk/eventhub/perf-tests/event-hubs-track-1/test/send.spec.ts @@ -3,9 +3,9 @@ import { getEnvVar, - PerfStressOptionDictionary, - PerfStressTest -} from "@azure/test-utils-perfstress"; + PerfOptionDictionary, + PerfTest +} from "@azure/test-utils-perf"; import { EventHubClient, EventData } from "@azure/event-hubs"; import { config } from "dotenv"; @@ -20,10 +20,10 @@ interface SendTestOptions { } const client = EventHubClient.createFromConnectionString(connectionString, eventHubName); -export class SendTest extends PerfStressTest { +export class SendTest extends PerfTest { producer: EventHubClient; eventBatch: EventData[]; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { eventBodySize: { required: true, description: "Size in bytes", diff --git a/sdk/eventhub/perf-tests/event-hubs/README.md b/sdk/eventhub/perf-tests/event-hubs/README.md index 2224bd2147a2..790eb609bd69 100644 --- a/sdk/eventhub/perf-tests/event-hubs/README.md +++ b/sdk/eventhub/perf-tests/event-hubs/README.md @@ -17,7 +17,7 @@ Create an event-hubs namespace and populate the `.env` file with the following v > npm run perf-test:node -- SendTest --warmup 2 --duration 7 --parallel 2 - _Note: For more default options, refer [Perf-Framework-Default-Options](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perfstress/README.md#keyconcepts)._ + _Note: For more default options, refer [Perf-Framework-Default-Options](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perf/README.md#keyconcepts)._ - To test receiving messages (this test does not use the framework, is a standalone test) diff --git a/sdk/eventhub/perf-tests/event-hubs/package.json b/sdk/eventhub/perf-tests/event-hubs/package.json index 12b8f7f64063..5a68da58d1bc 100644 --- a/sdk/eventhub/perf-tests/event-hubs/package.json +++ b/sdk/eventhub/perf-tests/event-hubs/package.json @@ -10,7 +10,7 @@ "dependencies": { "@azure/event-hubs": "^5.6.0", "@azure/core-amqp": "^3.0.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0", "moment": "^2.24.0", "uuid": "^8.3.0" diff --git a/sdk/eventhub/perf-tests/event-hubs/test/index.spec.ts b/sdk/eventhub/perf-tests/event-hubs/test/index.spec.ts index a72d02ad71eb..febad3a8522d 100644 --- a/sdk/eventhub/perf-tests/event-hubs/test/index.spec.ts +++ b/sdk/eventhub/perf-tests/event-hubs/test/index.spec.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { SendTest } from "./send.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram(selectPerfStressTest([SendTest])); +const perfProgram = new PerfProgram(selectPerfTest([SendTest])); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/eventhub/perf-tests/event-hubs/test/receive.spec.ts b/sdk/eventhub/perf-tests/event-hubs/test/receive.spec.ts index aebe9e79277f..4c49238e0499 100644 --- a/sdk/eventhub/perf-tests/event-hubs/test/receive.spec.ts +++ b/sdk/eventhub/perf-tests/event-hubs/test/receive.spec.ts @@ -21,7 +21,7 @@ import { PartitionContext, EventHubProducerClient } from "@azure/event-hubs"; -import { getEnvVar } from "@azure/test-utils-perfstress"; +import { getEnvVar } from "@azure/test-utils-perf"; import moment from "moment"; import { delay } from "@azure/core-amqp"; diff --git a/sdk/eventhub/perf-tests/event-hubs/test/send.spec.ts b/sdk/eventhub/perf-tests/event-hubs/test/send.spec.ts index 7683b1724d5a..64a4b7b1f99e 100644 --- a/sdk/eventhub/perf-tests/event-hubs/test/send.spec.ts +++ b/sdk/eventhub/perf-tests/event-hubs/test/send.spec.ts @@ -3,9 +3,9 @@ import { getEnvVar, - PerfStressOptionDictionary, - PerfStressTest -} from "@azure/test-utils-perfstress"; + PerfOptionDictionary, + PerfTest +} from "@azure/test-utils-perf"; import { EventHubProducerClient, EventData } from "@azure/event-hubs"; // Expects the .env file at the same level as the "test" folder @@ -21,10 +21,10 @@ const connectionString = getEnvVar("EVENTHUB_CONNECTION_STRING"); const eventHubName = getEnvVar("EVENTHUB_NAME"); const producer = new EventHubProducerClient(connectionString, eventHubName); -export class SendTest extends PerfStressTest { +export class SendTest extends PerfTest { producer: EventHubProducerClient; eventBatch: EventData[]; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { eventBodySize: { required: true, description: "Size in bytes", diff --git a/sdk/formrecognizer/perf-tests/ai-form-recognizer/package.json b/sdk/formrecognizer/perf-tests/ai-form-recognizer/package.json index bb05a686b2f9..74df7a13c318 100644 --- a/sdk/formrecognizer/perf-tests/ai-form-recognizer/package.json +++ b/sdk/formrecognizer/perf-tests/ai-form-recognizer/package.json @@ -11,7 +11,7 @@ "dependencies": { "@azure/ai-form-recognizer": "3.1.0-beta.3", "@azure/identity": "2.0.0-beta.5", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0", "tslib": "^2.2.0" }, diff --git a/sdk/formrecognizer/perf-tests/ai-form-recognizer/test/custom.spec.ts b/sdk/formrecognizer/perf-tests/ai-form-recognizer/test/custom.spec.ts index b092a212a7a0..8d3cb6556ece 100644 --- a/sdk/formrecognizer/perf-tests/ai-form-recognizer/test/custom.spec.ts +++ b/sdk/formrecognizer/perf-tests/ai-form-recognizer/test/custom.spec.ts @@ -2,10 +2,10 @@ // Licensed under the MIT license. import { - PerfStressOptionDictionary, - PerfStressTest, + PerfOptionDictionary, + PerfTest, getEnvVar -} from "@azure/test-utils-perfstress"; +} from "@azure/test-utils-perf"; import { AzureKeyCredential, BeginRecognizeCustomFormsOptions, @@ -19,8 +19,8 @@ function unreachable(message?: string): never { throw new Error(message ?? "Unreachable Exception."); } -export class CustomModelRecognitionTest extends PerfStressTest { - public options: PerfStressOptionDictionary = { +export class CustomModelRecognitionTest extends PerfTest { + public options: PerfOptionDictionary = { updateIntervalInMs: { required: false, description: "Polling interval in milliseconds", diff --git a/sdk/formrecognizer/perf-tests/ai-form-recognizer/test/index.spec.ts b/sdk/formrecognizer/perf-tests/ai-form-recognizer/test/index.spec.ts index 05418cef68f3..b2f7f9056060 100644 --- a/sdk/formrecognizer/perf-tests/ai-form-recognizer/test/index.spec.ts +++ b/sdk/formrecognizer/perf-tests/ai-form-recognizer/test/index.spec.ts @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { CustomModelRecognitionTest } from "./custom.spec"; import dotenv from "dotenv"; dotenv.config(); -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram(selectPerfStressTest([CustomModelRecognitionTest])); +const perfProgram = new PerfProgram(selectPerfTest([CustomModelRecognitionTest])); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/identity/perf-tests/identity/package.json b/sdk/identity/perf-tests/identity/package.json index e44100faf668..5527e9364c84 100644 --- a/sdk/identity/perf-tests/identity/package.json +++ b/sdk/identity/perf-tests/identity/package.json @@ -10,7 +10,7 @@ "dependencies": { "@azure/identity": "^2.0.0-beta.6", "@azure/identity-cache-persistence": "~1.0.0-beta.1", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0" }, "devDependencies": { diff --git a/sdk/identity/perf-tests/identity/test/ClientSecretCredential/persistence.spec.ts b/sdk/identity/perf-tests/identity/test/ClientSecretCredential/persistence.spec.ts index 00a71106650f..c35b73c07acc 100644 --- a/sdk/identity/perf-tests/identity/test/ClientSecretCredential/persistence.spec.ts +++ b/sdk/identity/perf-tests/identity/test/ClientSecretCredential/persistence.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { useIdentityPlugin, ClientSecretCredential } from "@azure/identity"; import { cachePersistencePlugin } from "@azure/identity-cache-persistence"; @@ -9,7 +9,7 @@ const scope = `https://servicebus.azure.net/.default`; /** * This test does silent authentication with persistence enabled. */ -export class ClientSecretCredentialPersistenceTest extends PerfStressTest { +export class ClientSecretCredentialPersistenceTest extends PerfTest { options = {}; static credential: ClientSecretCredential; diff --git a/sdk/identity/perf-tests/identity/test/index.spec.ts b/sdk/identity/perf-tests/identity/test/index.spec.ts index db2d7cec4302..af05fbe657b6 100644 --- a/sdk/identity/perf-tests/identity/test/index.spec.ts +++ b/sdk/identity/perf-tests/identity/test/index.spec.ts @@ -1,12 +1,12 @@ import { ClientSecretCredentialPersistenceTest } from "./ClientSecretCredential/persistence.spec"; -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import * as dotenv from "dotenv"; dotenv.config(); -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([ClientSecretCredentialPersistenceTest]) +const perfProgram = new PerfProgram( + selectPerfTest([ClientSecretCredentialPersistenceTest]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/keyvault/perf-tests/keyvault-certificates/package.json b/sdk/keyvault/perf-tests/keyvault-certificates/package.json index fbad72b02691..b4dd1cef7359 100644 --- a/sdk/keyvault/perf-tests/keyvault-certificates/package.json +++ b/sdk/keyvault/perf-tests/keyvault-certificates/package.json @@ -8,7 +8,7 @@ "author": "", "license": "ISC", "dependencies": { - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0", "@azure/identity": "2.0.0-beta.5", "uuid": "^8.3.0", diff --git a/sdk/keyvault/perf-tests/keyvault-certificates/test/getCertificate.spec.ts b/sdk/keyvault/perf-tests/keyvault-certificates/test/getCertificate.spec.ts index a831790728a4..383421e0fdfe 100644 --- a/sdk/keyvault/perf-tests/keyvault-certificates/test/getCertificate.spec.ts +++ b/sdk/keyvault/perf-tests/keyvault-certificates/test/getCertificate.spec.ts @@ -1,9 +1,9 @@ -import { PerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfTest } from "@azure/test-utils-perf"; import { credential, keyVaultUri } from "./utils"; import { CertificateClient, WellKnownIssuer } from "@azure/keyvault-certificates"; import { v4 as uuid } from "uuid"; -export abstract class CertificateTest extends PerfStressTest { +export abstract class CertificateTest extends PerfTest { options = {}; certificateClient: CertificateClient; static certificateName = `c-${uuid()}`; diff --git a/sdk/keyvault/perf-tests/keyvault-certificates/test/index.spec.ts b/sdk/keyvault/perf-tests/keyvault-certificates/test/index.spec.ts index 7e2c766c0a55..ccc411f964c7 100644 --- a/sdk/keyvault/perf-tests/keyvault-certificates/test/index.spec.ts +++ b/sdk/keyvault/perf-tests/keyvault-certificates/test/index.spec.ts @@ -1,8 +1,8 @@ -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { GetCertificateTest } from "./getCertificate.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram(selectPerfStressTest([GetCertificateTest])); +const perfProgram = new PerfProgram(selectPerfTest([GetCertificateTest])); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/keyvault/perf-tests/keyvault-certificates/test/utils.ts b/sdk/keyvault/perf-tests/keyvault-certificates/test/utils.ts index cdc77c535572..cab69de22adf 100644 --- a/sdk/keyvault/perf-tests/keyvault-certificates/test/utils.ts +++ b/sdk/keyvault/perf-tests/keyvault-certificates/test/utils.ts @@ -1,5 +1,5 @@ import { ClientSecretCredential } from "@azure/identity"; -import { getEnvVar } from "@azure/test-utils-perfstress"; +import { getEnvVar } from "@azure/test-utils-perf"; import * as dotenv from "dotenv"; dotenv.config(); diff --git a/sdk/keyvault/perf-tests/keyvault-keys/package.json b/sdk/keyvault/perf-tests/keyvault-keys/package.json index c9d5b6a9a6fb..59a4289ea94c 100644 --- a/sdk/keyvault/perf-tests/keyvault-keys/package.json +++ b/sdk/keyvault/perf-tests/keyvault-keys/package.json @@ -8,7 +8,7 @@ "author": "", "license": "ISC", "dependencies": { - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "@azure/keyvault-keys": "^4.2.1", "dotenv": "^8.2.0", "@azure/identity": "2.0.0-beta.6", diff --git a/sdk/keyvault/perf-tests/keyvault-keys/test/cryptography/cryptography.spec.ts b/sdk/keyvault/perf-tests/keyvault-keys/test/cryptography/cryptography.spec.ts index 490552474bb2..0f6958b5e199 100644 --- a/sdk/keyvault/perf-tests/keyvault-keys/test/cryptography/cryptography.spec.ts +++ b/sdk/keyvault/perf-tests/keyvault-keys/test/cryptography/cryptography.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressOptionDictionary, PerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, PerfTest } from "@azure/test-utils-perf"; import { CryptographyClient, KeyClient } from "@azure/keyvault-keys"; import { v4 as uuid } from "uuid"; import { credential, keyVaultUri } from "../utils"; @@ -7,8 +7,8 @@ interface CryptographyPerfTestOptions { keySize: number; } -export abstract class CryptographyTest extends PerfStressTest { - options: PerfStressOptionDictionary = { +export abstract class CryptographyTest extends PerfTest { + options: PerfOptionDictionary = { keySize: { required: false, description: "The size of the key to be created", diff --git a/sdk/keyvault/perf-tests/keyvault-keys/test/index.spec.ts b/sdk/keyvault/perf-tests/keyvault-keys/test/index.spec.ts index 08352afff0be..bae65b2ed9ba 100644 --- a/sdk/keyvault/perf-tests/keyvault-keys/test/index.spec.ts +++ b/sdk/keyvault/perf-tests/keyvault-keys/test/index.spec.ts @@ -1,13 +1,13 @@ -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { GetKeyTest } from "./keys/get.spec"; import { DecryptTest } from "./cryptography/decrypt.spec"; import { SignTest } from "./cryptography/sign.spec"; import { UnwrapKeyTest } from "./cryptography/unwrapKey.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([GetKeyTest, DecryptTest, SignTest, UnwrapKeyTest]) +const perfProgram = new PerfProgram( + selectPerfTest([GetKeyTest, DecryptTest, SignTest, UnwrapKeyTest]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/keyvault/perf-tests/keyvault-keys/test/keys/get.spec.ts b/sdk/keyvault/perf-tests/keyvault-keys/test/keys/get.spec.ts index ef558e75876d..982840fc27db 100644 --- a/sdk/keyvault/perf-tests/keyvault-keys/test/keys/get.spec.ts +++ b/sdk/keyvault/perf-tests/keyvault-keys/test/keys/get.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressOptionDictionary, PerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, PerfTest } from "@azure/test-utils-perf"; import { KeyClient } from "@azure/keyvault-keys"; import { credential, keyVaultUri } from "../utils"; import { v4 as uuid } from "uuid"; @@ -7,8 +7,8 @@ interface KeyPerfTestOptions { keySize: number; } -export abstract class KeyTest extends PerfStressTest { - options: PerfStressOptionDictionary = { +export abstract class KeyTest extends PerfTest { + options: PerfOptionDictionary = { keySize: { required: false, description: "The size of the key to be created", diff --git a/sdk/keyvault/perf-tests/keyvault-keys/test/utils.ts b/sdk/keyvault/perf-tests/keyvault-keys/test/utils.ts index cdc77c535572..cab69de22adf 100644 --- a/sdk/keyvault/perf-tests/keyvault-keys/test/utils.ts +++ b/sdk/keyvault/perf-tests/keyvault-keys/test/utils.ts @@ -1,5 +1,5 @@ import { ClientSecretCredential } from "@azure/identity"; -import { getEnvVar } from "@azure/test-utils-perfstress"; +import { getEnvVar } from "@azure/test-utils-perf"; import * as dotenv from "dotenv"; dotenv.config(); diff --git a/sdk/keyvault/perf-tests/keyvault-secrets/package.json b/sdk/keyvault/perf-tests/keyvault-secrets/package.json index 68982d0abd4b..ad198f66e39c 100644 --- a/sdk/keyvault/perf-tests/keyvault-secrets/package.json +++ b/sdk/keyvault/perf-tests/keyvault-secrets/package.json @@ -8,7 +8,7 @@ "author": "", "license": "ISC", "dependencies": { - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0", "@azure/identity": "2.0.0-beta.5", "uuid": "^8.3.0", diff --git a/sdk/keyvault/perf-tests/keyvault-secrets/test/index.spec.ts b/sdk/keyvault/perf-tests/keyvault-secrets/test/index.spec.ts index faabdc53d0ec..978ce0a13820 100644 --- a/sdk/keyvault/perf-tests/keyvault-secrets/test/index.spec.ts +++ b/sdk/keyvault/perf-tests/keyvault-secrets/test/index.spec.ts @@ -1,11 +1,11 @@ -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { GetSecretTest } from "./getSecret.spec"; import { ListSecretsTest } from "./listSecrets.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([GetSecretTest, ListSecretsTest]) +const perfProgram = new PerfProgram( + selectPerfTest([GetSecretTest, ListSecretsTest]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/keyvault/perf-tests/keyvault-secrets/test/listSecrets.spec.ts b/sdk/keyvault/perf-tests/keyvault-secrets/test/listSecrets.spec.ts index 12786c95ad6c..a2d691b25ac9 100644 --- a/sdk/keyvault/perf-tests/keyvault-secrets/test/listSecrets.spec.ts +++ b/sdk/keyvault/perf-tests/keyvault-secrets/test/listSecrets.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { SecretTest } from "./secretTest"; import { v4 as uuid } from "uuid"; @@ -8,7 +8,7 @@ interface ListSecretPerfTestOptions { export class ListSecretsTest extends SecretTest { static secretsToDelete: string[] = []; - options: PerfStressOptionDictionary = { + options: PerfOptionDictionary = { count: { required: false, description: "The number of secrets to create", diff --git a/sdk/keyvault/perf-tests/keyvault-secrets/test/secretTest.ts b/sdk/keyvault/perf-tests/keyvault-secrets/test/secretTest.ts index b2b2123a130b..7444230dcd72 100644 --- a/sdk/keyvault/perf-tests/keyvault-secrets/test/secretTest.ts +++ b/sdk/keyvault/perf-tests/keyvault-secrets/test/secretTest.ts @@ -1,8 +1,8 @@ import { SecretClient } from "@azure/keyvault-secrets"; -import { PerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfTest } from "@azure/test-utils-perf"; import { keyVaultUri, credential } from "./utils"; -export abstract class SecretTest> extends PerfStressTest< +export abstract class SecretTest> extends PerfTest< TOptions > { secretClient: SecretClient; diff --git a/sdk/keyvault/perf-tests/keyvault-secrets/test/utils.ts b/sdk/keyvault/perf-tests/keyvault-secrets/test/utils.ts index cdc77c535572..cab69de22adf 100644 --- a/sdk/keyvault/perf-tests/keyvault-secrets/test/utils.ts +++ b/sdk/keyvault/perf-tests/keyvault-secrets/test/utils.ts @@ -1,5 +1,5 @@ import { ClientSecretCredential } from "@azure/identity"; -import { getEnvVar } from "@azure/test-utils-perfstress"; +import { getEnvVar } from "@azure/test-utils-perf"; import * as dotenv from "dotenv"; dotenv.config(); diff --git a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/package.json b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/package.json index 6e42f569eb69..c20015498d94 100644 --- a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/package.json +++ b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/package.json @@ -9,7 +9,7 @@ "license": "ISC", "dependencies": { "@azure/ai-metrics-advisor": "1.0.0-beta.3", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0" }, "devDependencies": { diff --git a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/index.spec.ts b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/index.spec.ts index 580889b960b2..847463a61fb6 100644 --- a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/index.spec.ts +++ b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/index.spec.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { AnomaliesListTest } from "./listAnomalies.spec"; import { IncidentsListTest } from "./listIncidents.spec"; import { RootCauseTest } from "./rootCauses.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([AnomaliesListTest, IncidentsListTest, RootCauseTest]) +const perfProgram = new PerfProgram( + selectPerfTest([AnomaliesListTest, IncidentsListTest, RootCauseTest]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/listAnomalies.spec.ts b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/listAnomalies.spec.ts index 670cd3f9d5bf..20c36482c1ed 100644 --- a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/listAnomalies.spec.ts +++ b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/listAnomalies.spec.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, getEnvVar } from "@azure/test-utils-perf"; import { MetricsAdvisorTest } from "./metricsAdvisor.spec"; type MetricsAdvisorTestOptions = Record; export class AnomaliesListTest extends MetricsAdvisorTest { alertId: string; alertConfigId: string; - public options: PerfStressOptionDictionary = {}; + public options: PerfOptionDictionary = {}; constructor() { super(); this.alertId = getEnvVar("METRICS_ADVISOR_ALERT_ID"); diff --git a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/listIncidents.spec.ts b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/listIncidents.spec.ts index 13dc294d72f9..07fca2b61680 100644 --- a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/listIncidents.spec.ts +++ b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/listIncidents.spec.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, getEnvVar } from "@azure/test-utils-perf"; import { MetricsAdvisorTest } from "./metricsAdvisor.spec"; type MetricsAdvisorTestOptions = Record; export class IncidentsListTest extends MetricsAdvisorTest { alertId: string; alertConfigId: string; - public options: PerfStressOptionDictionary = {}; + public options: PerfOptionDictionary = {}; constructor() { super(); this.alertId = getEnvVar("METRICS_ADVISOR_ALERT_ID"); diff --git a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/metricsAdvisor.spec.ts b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/metricsAdvisor.spec.ts index 0ea8e4374934..c17519df8c5f 100644 --- a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/metricsAdvisor.spec.ts +++ b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/metricsAdvisor.spec.ts @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { MetricsAdvisorClient, MetricsAdvisorKeyCredential } from "@azure/ai-metrics-advisor"; // Expects the .env file at the same level import * as dotenv from "dotenv"; dotenv.config(); -export abstract class MetricsAdvisorTest extends PerfStressTest { +export abstract class MetricsAdvisorTest extends PerfTest { client: MetricsAdvisorClient; constructor() { diff --git a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/rootCauses.spec.ts b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/rootCauses.spec.ts index fb389be5c098..ae1069e5f046 100644 --- a/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/rootCauses.spec.ts +++ b/sdk/metricsadvisor/perf-tests/ai-metrics-advisor/test/rootCauses.spec.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, getEnvVar } from "@azure/test-utils-perf"; import { MetricsAdvisorTest } from "./metricsAdvisor.spec"; type MetricsAdvisorTestOptions = Record; export class RootCauseTest extends MetricsAdvisorTest { detectionConfigId: string; incidentId: string; - public options: PerfStressOptionDictionary = {}; + public options: PerfOptionDictionary = {}; constructor() { super(); this.detectionConfigId = getEnvVar("METRICS_ADVISOR_DETECTION_CONFIG_ID"); diff --git a/sdk/monitor/perf-tests/monitor-query/package.json b/sdk/monitor/perf-tests/monitor-query/package.json index fdf1750f743d..c19ed140fb58 100644 --- a/sdk/monitor/perf-tests/monitor-query/package.json +++ b/sdk/monitor/perf-tests/monitor-query/package.json @@ -9,7 +9,7 @@ "license": "ISC", "dependencies": { "@azure/monitor-query": "^1.0.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0", "@azure/identity": "^2.0.0" }, diff --git a/sdk/monitor/perf-tests/monitor-query/test/index.spec.ts b/sdk/monitor/perf-tests/monitor-query/test/index.spec.ts index d581e2a242d0..7a091c71897b 100644 --- a/sdk/monitor/perf-tests/monitor-query/test/index.spec.ts +++ b/sdk/monitor/perf-tests/monitor-query/test/index.spec.ts @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { MetricsQueryTest } from "./metricQuery.spec"; import { LogQueryBatchTest } from "./logQueryBatch.spec"; import { LogQueryTest } from "./logQuery.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([MetricsQueryTest, LogQueryBatchTest, LogQueryTest]) +const perfProgram = new PerfProgram( + selectPerfTest([MetricsQueryTest, LogQueryBatchTest, LogQueryTest]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/monitor/perf-tests/monitor-query/test/logQuery.spec.ts b/sdk/monitor/perf-tests/monitor-query/test/logQuery.spec.ts index d76aafa44071..439e671aea51 100644 --- a/sdk/monitor/perf-tests/monitor-query/test/logQuery.spec.ts +++ b/sdk/monitor/perf-tests/monitor-query/test/logQuery.spec.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, getEnvVar } from "@azure/test-utils-perf"; import { MonitorQueryLog } from "./monitorQueryLog.spec"; type MonitorQueryTestOptions = Record; @@ -8,7 +8,7 @@ type MonitorQueryTestOptions = Record; export class LogQueryTest extends MonitorQueryLog { workspaceId: string; query: string; - public options: PerfStressOptionDictionary = {}; + public options: PerfOptionDictionary = {}; constructor() { super(); this.workspaceId = getEnvVar("MONITOR_WORKSPACE_ID"); diff --git a/sdk/monitor/perf-tests/monitor-query/test/logQueryBatch.spec.ts b/sdk/monitor/perf-tests/monitor-query/test/logQueryBatch.spec.ts index 7630014a82e7..025bbd2d0566 100644 --- a/sdk/monitor/perf-tests/monitor-query/test/logQueryBatch.spec.ts +++ b/sdk/monitor/perf-tests/monitor-query/test/logQueryBatch.spec.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, getEnvVar } from "@azure/test-utils-perf"; import { MonitorQueryLog } from "./monitorQueryLog.spec"; import { QueryBatch } from "@azure/monitor-query"; @@ -9,7 +9,7 @@ type MonitorQueryTestOptions = Record; export class LogQueryBatchTest extends MonitorQueryLog { workspaceId: string; queryBatch: QueryBatch[]; - public options: PerfStressOptionDictionary = {}; + public options: PerfOptionDictionary = {}; constructor() { super(); this.workspaceId = getEnvVar("MONITOR_WORKSPACE_ID"); diff --git a/sdk/monitor/perf-tests/monitor-query/test/metricQuery.spec.ts b/sdk/monitor/perf-tests/monitor-query/test/metricQuery.spec.ts index 37dbf42fdf53..d1e1a20edfba 100644 --- a/sdk/monitor/perf-tests/monitor-query/test/metricQuery.spec.ts +++ b/sdk/monitor/perf-tests/monitor-query/test/metricQuery.spec.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, getEnvVar } from "@azure/test-utils-perf"; import { AggregationType } from "@azure/monitor-query"; import { MonitorQueryMetrics } from "./monitorQueryMetrics.spec"; @@ -10,7 +10,7 @@ export class MetricsQueryTest extends MonitorQueryMetrics = {}; + public options: PerfOptionDictionary = {}; constructor() { super(); this.metricsUri = getEnvVar("METRICS_RESOURCE_ID"); diff --git a/sdk/monitor/perf-tests/monitor-query/test/monitorQueryLog.spec.ts b/sdk/monitor/perf-tests/monitor-query/test/monitorQueryLog.spec.ts index c4023c679441..bbfcb6f36129 100644 --- a/sdk/monitor/perf-tests/monitor-query/test/monitorQueryLog.spec.ts +++ b/sdk/monitor/perf-tests/monitor-query/test/monitorQueryLog.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfTest } from "@azure/test-utils-perf"; import { LogsQueryClient } from "@azure/monitor-query"; import { DefaultAzureCredential } from "@azure/identity"; @@ -9,7 +9,7 @@ import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; dotenv.config(); -export abstract class MonitorQueryLog extends PerfStressTest { +export abstract class MonitorQueryLog extends PerfTest { client: LogsQueryClient; constructor() { diff --git a/sdk/monitor/perf-tests/monitor-query/test/monitorQueryMetrics.spec.ts b/sdk/monitor/perf-tests/monitor-query/test/monitorQueryMetrics.spec.ts index 07dfc433b8d7..fd478f23d97e 100644 --- a/sdk/monitor/perf-tests/monitor-query/test/monitorQueryMetrics.spec.ts +++ b/sdk/monitor/perf-tests/monitor-query/test/monitorQueryMetrics.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfTest } from "@azure/test-utils-perf"; import { MetricsQueryClient } from "@azure/monitor-query"; import { DefaultAzureCredential } from "@azure/identity"; @@ -9,7 +9,7 @@ import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; dotenv.config(); -export abstract class MonitorQueryMetrics extends PerfStressTest { +export abstract class MonitorQueryMetrics extends PerfTest { client: MetricsQueryClient; constructor() { diff --git a/sdk/search/perf-tests/search-documents/package.json b/sdk/search/perf-tests/search-documents/package.json index a4e73b3c1f18..c08172c3770f 100644 --- a/sdk/search/perf-tests/search-documents/package.json +++ b/sdk/search/perf-tests/search-documents/package.json @@ -10,7 +10,7 @@ "dependencies": { "@azure/identity": "2.0.0-beta.5", "@azure/search-documents": "11.3.0-beta.4", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0" }, "devDependencies": { diff --git a/sdk/search/perf-tests/search-documents/test/autoCompleteTest.spec.ts b/sdk/search/perf-tests/search-documents/test/autoCompleteTest.spec.ts index c33e91b6ad19..5c00ba06cc46 100644 --- a/sdk/search/perf-tests/search-documents/test/autoCompleteTest.spec.ts +++ b/sdk/search/perf-tests/search-documents/test/autoCompleteTest.spec.ts @@ -1,8 +1,8 @@ import { SearchDocumentsBase, SearchDocumentsTestOptions } from "./core/searchDocumentsBase.spec"; -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; export class AutoCompleteTest extends SearchDocumentsBase { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { documentsCount: { required: true, description: "Number of Documents to be created", diff --git a/sdk/search/perf-tests/search-documents/test/core/searchDocumentsBase.spec.ts b/sdk/search/perf-tests/search-documents/test/core/searchDocumentsBase.spec.ts index 545bbefde80e..cbfccdcdeb2f 100644 --- a/sdk/search/perf-tests/search-documents/test/core/searchDocumentsBase.spec.ts +++ b/sdk/search/perf-tests/search-documents/test/core/searchDocumentsBase.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { SearchClient, AzureKeyCredential, @@ -15,7 +15,7 @@ export interface SearchDocumentsTestOptions { export abstract class SearchDocumentsBase< TOptions = Record -> extends PerfStressTest { +> extends PerfTest { searchIndexClient: SearchIndexClient; searchClient: SearchClient; indexName: string; diff --git a/sdk/search/perf-tests/search-documents/test/index.spec.ts b/sdk/search/perf-tests/search-documents/test/index.spec.ts index b890db7613b7..7717250a1b16 100644 --- a/sdk/search/perf-tests/search-documents/test/index.spec.ts +++ b/sdk/search/perf-tests/search-documents/test/index.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { AutoCompleteTest } from "./autoCompleteTest.spec"; import { IndexDocumentsTest } from "./indexDocumentsTest.spec"; import { SearchDocumentsTest } from "./searchDocumentsTest.spec"; @@ -10,10 +10,10 @@ import { SuggestTest } from "./suggestTest.spec"; import dotenv from "dotenv"; dotenv.config(); -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([AutoCompleteTest, IndexDocumentsTest, SearchDocumentsTest, SuggestTest]) +const perfProgram = new PerfProgram( + selectPerfTest([AutoCompleteTest, IndexDocumentsTest, SearchDocumentsTest, SuggestTest]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/search/perf-tests/search-documents/test/indexDocumentsTest.spec.ts b/sdk/search/perf-tests/search-documents/test/indexDocumentsTest.spec.ts index 618dd70902ce..84f5d5524b8c 100644 --- a/sdk/search/perf-tests/search-documents/test/indexDocumentsTest.spec.ts +++ b/sdk/search/perf-tests/search-documents/test/indexDocumentsTest.spec.ts @@ -1,11 +1,11 @@ import { SearchDocumentsBase, SearchDocumentsTestOptions } from "./core/searchDocumentsBase.spec"; -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { generateHotels } from "./core/documentsGenerator"; import { Hotel } from "./core/hotel"; import { IndexDocumentsBatch } from "@azure/search-documents"; export class IndexDocumentsTest extends SearchDocumentsBase { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { documentsCount: { required: true, description: "Number of Documents to be created", diff --git a/sdk/search/perf-tests/search-documents/test/searchDocumentsTest.spec.ts b/sdk/search/perf-tests/search-documents/test/searchDocumentsTest.spec.ts index daa9f2380158..371dfba92ed2 100644 --- a/sdk/search/perf-tests/search-documents/test/searchDocumentsTest.spec.ts +++ b/sdk/search/perf-tests/search-documents/test/searchDocumentsTest.spec.ts @@ -1,8 +1,8 @@ import { SearchDocumentsBase, SearchDocumentsTestOptions } from "./core/searchDocumentsBase.spec"; -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; export class SearchDocumentsTest extends SearchDocumentsBase { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { documentsCount: { required: true, description: "Number of Documents to be created", diff --git a/sdk/search/perf-tests/search-documents/test/suggestTest.spec.ts b/sdk/search/perf-tests/search-documents/test/suggestTest.spec.ts index 8c81cb94b2cd..fc3663c13367 100644 --- a/sdk/search/perf-tests/search-documents/test/suggestTest.spec.ts +++ b/sdk/search/perf-tests/search-documents/test/suggestTest.spec.ts @@ -1,8 +1,8 @@ import { SearchDocumentsBase, SearchDocumentsTestOptions } from "./core/searchDocumentsBase.spec"; -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; export class SuggestTest extends SearchDocumentsBase { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { documentsCount: { required: true, description: "Number of Documents to be created", diff --git a/sdk/servicebus/perf-tests/service-bus-track-1/README.md b/sdk/servicebus/perf-tests/service-bus-track-1/README.md index ce9629c98087..18a2d3991e77 100644 --- a/sdk/servicebus/perf-tests/service-bus-track-1/README.md +++ b/sdk/servicebus/perf-tests/service-bus-track-1/README.md @@ -18,4 +18,4 @@ To test sending messages in batches > `npm run perf-test:node -- BatchSendTest --warmup 1 --duration 25 --iterations 2 --parallel 32 --messageBodySize 10240 --numberOfMessages 10` -_Note: For more default options, refer [Perf-Framework-Default-Options](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perfstress/README.md#keyconcepts)._ +_Note: For more default options, refer [Perf-Framework-Default-Options](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perf/README.md#keyconcepts)._ diff --git a/sdk/servicebus/perf-tests/service-bus-track-1/package.json b/sdk/servicebus/perf-tests/service-bus-track-1/package.json index 93b98ca65dfb..f8706842b004 100644 --- a/sdk/servicebus/perf-tests/service-bus-track-1/package.json +++ b/sdk/servicebus/perf-tests/service-bus-track-1/package.json @@ -9,7 +9,7 @@ "dependencies": { "@azure/service-bus": "^1.1.10", "@azure/service-bus-v7": "npm:@azure/service-bus@^7.0.0", - "@azure/test-utils-perfstress": "file:../../../test-utils/perfstress/azure-test-utils-perfstress-1.0.0.tgz", + "@azure/test-utils-perf": "file:../../../test-utils/perf/azure-test-utils-perf-1.0.0.tgz", "dotenv": "^8.2.0", "uuid": "^8.3.0" }, diff --git a/sdk/servicebus/perf-tests/service-bus-track-1/test/index.spec.ts b/sdk/servicebus/perf-tests/service-bus-track-1/test/index.spec.ts index a186da32216a..08d3f43f4fa2 100644 --- a/sdk/servicebus/perf-tests/service-bus-track-1/test/index.spec.ts +++ b/sdk/servicebus/perf-tests/service-bus-track-1/test/index.spec.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { BatchSendTest } from "./sendBatch.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram(selectPerfStressTest([BatchSendTest])); +const perfProgram = new PerfProgram(selectPerfTest([BatchSendTest])); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/servicebus/perf-tests/service-bus-track-1/test/sbBase.spec.ts b/sdk/servicebus/perf-tests/service-bus-track-1/test/sbBase.spec.ts index e814b6ac13b1..3095ef790573 100644 --- a/sdk/servicebus/perf-tests/service-bus-track-1/test/sbBase.spec.ts +++ b/sdk/servicebus/perf-tests/service-bus-track-1/test/sbBase.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { ServiceBusClient } from "@azure/service-bus"; import { ServiceBusAdministrationClient } from "@azure/service-bus-v7"; @@ -11,7 +11,7 @@ dotenv.config(); const connectionString = getEnvVar("SERVICEBUS_CONNECTION_STRING"); -export abstract class ServiceBusTest extends PerfStressTest { +export abstract class ServiceBusTest extends PerfTest { static sbClient: ServiceBusClient = ServiceBusClient.createFromConnectionString(connectionString); static sbAdminClient = new ServiceBusAdministrationClient(connectionString); static queueName = `newqueue-${Math.ceil(Math.random() * 1000)}`; diff --git a/sdk/servicebus/perf-tests/service-bus-track-1/test/sendBatch.spec.ts b/sdk/servicebus/perf-tests/service-bus-track-1/test/sendBatch.spec.ts index e2736f525349..23cf13cb86b5 100644 --- a/sdk/servicebus/perf-tests/service-bus-track-1/test/sendBatch.spec.ts +++ b/sdk/servicebus/perf-tests/service-bus-track-1/test/sendBatch.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { SendableMessageInfo } from "@azure/service-bus"; import { ServiceBusTest } from "./sbBase.spec"; @@ -13,7 +13,7 @@ interface SendTestOptions { export class BatchSendTest extends ServiceBusTest { static sender = ServiceBusTest.sbClient.createQueueClient(BatchSendTest.queueName).createSender(); batch: SendableMessageInfo[]; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { messageBodySize: { required: true, description: "Size in bytes", diff --git a/sdk/servicebus/perf-tests/service-bus/README.md b/sdk/servicebus/perf-tests/service-bus/README.md index c058c3556e1a..0b42e37e5c87 100644 --- a/sdk/servicebus/perf-tests/service-bus/README.md +++ b/sdk/servicebus/perf-tests/service-bus/README.md @@ -15,4 +15,4 @@ To test sending messages in batches > `npm run perf-test:node -- BatchSendTest --warmup 1 --duration 25 --iterations 2 --parallel 32 --messageBodySize 10240 --numberOfMessages 10` -_Note: For more default options, refer [Perf-Framework-Default-Options](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perfstress/README.md#keyconcepts)._ +_Note: For more default options, refer [Perf-Framework-Default-Options](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perf/README.md#keyconcepts)._ diff --git a/sdk/servicebus/perf-tests/service-bus/package.json b/sdk/servicebus/perf-tests/service-bus/package.json index 5a285838db3d..e5a83b43d6ba 100644 --- a/sdk/servicebus/perf-tests/service-bus/package.json +++ b/sdk/servicebus/perf-tests/service-bus/package.json @@ -9,7 +9,7 @@ "license": "ISC", "dependencies": { "@azure/service-bus": "^7.0.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0", "uuid": "^8.3.0" }, diff --git a/sdk/servicebus/perf-tests/service-bus/test/index.spec.ts b/sdk/servicebus/perf-tests/service-bus/test/index.spec.ts index a186da32216a..08d3f43f4fa2 100644 --- a/sdk/servicebus/perf-tests/service-bus/test/index.spec.ts +++ b/sdk/servicebus/perf-tests/service-bus/test/index.spec.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { BatchSendTest } from "./sendBatch.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram(selectPerfStressTest([BatchSendTest])); +const perfProgram = new PerfProgram(selectPerfTest([BatchSendTest])); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/servicebus/perf-tests/service-bus/test/sbBase.spec.ts b/sdk/servicebus/perf-tests/service-bus/test/sbBase.spec.ts index f12d9140cf94..c6bd02a3f5d5 100644 --- a/sdk/servicebus/perf-tests/service-bus/test/sbBase.spec.ts +++ b/sdk/servicebus/perf-tests/service-bus/test/sbBase.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { ServiceBusAdministrationClient, ServiceBusClient } from "@azure/service-bus"; // Expects the .env file at the same level as the "test" folder @@ -10,7 +10,7 @@ dotenv.config(); const connectionString = getEnvVar("SERVICEBUS_CONNECTION_STRING"); -export abstract class ServiceBusTest extends PerfStressTest { +export abstract class ServiceBusTest extends PerfTest { static sbClient: ServiceBusClient = new ServiceBusClient(connectionString); static sbAdminClient = new ServiceBusAdministrationClient(connectionString); static queueName = `newqueue-${Math.ceil(Math.random() * 1000)}`; diff --git a/sdk/servicebus/perf-tests/service-bus/test/sendBatch.spec.ts b/sdk/servicebus/perf-tests/service-bus/test/sendBatch.spec.ts index 0ff4be31a17a..af512d53b85f 100644 --- a/sdk/servicebus/perf-tests/service-bus/test/sendBatch.spec.ts +++ b/sdk/servicebus/perf-tests/service-bus/test/sendBatch.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { ServiceBusMessage, ServiceBusSender } from "@azure/service-bus"; import { ServiceBusTest } from "./sbBase.spec"; @@ -13,7 +13,7 @@ interface SendTestOptions { export class BatchSendTest extends ServiceBusTest { static sender: ServiceBusSender = ServiceBusTest.sbClient.createSender(BatchSendTest.queueName); batch: ServiceBusMessage[]; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { messageBodySize: { required: true, description: "Size in bytes", diff --git a/sdk/servicebus/service-bus/package.json b/sdk/servicebus/service-bus/package.json index 351e175bc680..9c3a31c5a011 100644 --- a/sdk/servicebus/service-bus/package.json +++ b/sdk/servicebus/service-bus/package.json @@ -132,7 +132,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "2.0.0-beta.6", "@azure/test-utils": "^1.0.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "@microsoft/api-extractor": "^7.18.11", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-inject": "^4.0.0", diff --git a/sdk/storage/perf-tests/storage-blob-track-1/package.json b/sdk/storage/perf-tests/storage-blob-track-1/package.json index 3f148929e965..74d20e2647b3 100644 --- a/sdk/storage/perf-tests/storage-blob-track-1/package.json +++ b/sdk/storage/perf-tests/storage-blob-track-1/package.json @@ -9,7 +9,7 @@ "license": "ISC", "devDependencies": { "@azure/storage-blob": "^10.5.0", - "@azure/test-utils-perfstress": "file:../../../test-utils/perfstress/azure-test-utils-perfstress-1.0.0.tgz", + "@azure/test-utils-perf": "file:../../../test-utils/perf/azure-test-utils-perf-1.0.0.tgz", "@types/node": "^12.0.0", "@types/uuid": "^8.0.0", "dotenv": "^8.2.0", diff --git a/sdk/storage/perf-tests/storage-blob-track-1/test/download.spec.ts b/sdk/storage/perf-tests/storage-blob-track-1/test/download.spec.ts index a0f5cfc82f2a..56935ff8613c 100644 --- a/sdk/storage/perf-tests/storage-blob-track-1/test/download.spec.ts +++ b/sdk/storage/perf-tests/storage-blob-track-1/test/download.spec.ts @@ -3,7 +3,7 @@ import { v4 as generateUuid } from "uuid"; import { Aborter, BlobURL, BlockBlobURL } from "@azure/storage-blob"; -import { PerfStressOptionDictionary, drainStream } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, drainStream } from "@azure/test-utils-perf"; import { StorageBlobTest } from "./storageTest.spec"; interface StorageBlobDownloadTestOptions { @@ -11,7 +11,7 @@ interface StorageBlobDownloadTestOptions { } export class StorageBlobDownloadTest extends StorageBlobTest { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-blob-track-1/test/index.spec.ts b/sdk/storage/perf-tests/storage-blob-track-1/test/index.spec.ts index 9f84b9c18373..d0a61954727f 100644 --- a/sdk/storage/perf-tests/storage-blob-track-1/test/index.spec.ts +++ b/sdk/storage/perf-tests/storage-blob-track-1/test/index.spec.ts @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { StorageBlobDownloadTest } from "./download.spec"; import { StorageBlobUploadTest } from "./upload.spec"; import { StorageBlobListTest } from "./listBlobs.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([StorageBlobDownloadTest, StorageBlobUploadTest, StorageBlobListTest]) +const perfProgram = new PerfProgram( + selectPerfTest([StorageBlobDownloadTest, StorageBlobUploadTest, StorageBlobListTest]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/storage/perf-tests/storage-blob-track-1/test/listBlobs.spec.ts b/sdk/storage/perf-tests/storage-blob-track-1/test/listBlobs.spec.ts index 4cab2aba9a44..39e5ab1871a7 100644 --- a/sdk/storage/perf-tests/storage-blob-track-1/test/listBlobs.spec.ts +++ b/sdk/storage/perf-tests/storage-blob-track-1/test/listBlobs.spec.ts @@ -3,14 +3,14 @@ import { v4 as generateUuid } from "uuid"; import { Aborter, BlockBlobURL } from "@azure/storage-blob"; -import { executeParallel, PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { executeParallel, PerfOptionDictionary } from "@azure/test-utils-perf"; import { StorageBlobTest } from "./storageTest.spec"; interface StorageBlobListTestOptions { count: number; } export class StorageBlobListTest extends StorageBlobTest { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { count: { required: true, description: "Number of blobs to be listed", diff --git a/sdk/storage/perf-tests/storage-blob-track-1/test/storageTest.spec.ts b/sdk/storage/perf-tests/storage-blob-track-1/test/storageTest.spec.ts index 6e4aee6b999a..25bc9d1d5945 100644 --- a/sdk/storage/perf-tests/storage-blob-track-1/test/storageTest.spec.ts +++ b/sdk/storage/perf-tests/storage-blob-track-1/test/storageTest.spec.ts @@ -9,13 +9,13 @@ import { SharedKeyCredential, StorageURL } from "@azure/storage-blob"; -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; // Expects the .env file at the same level import * as dotenv from "dotenv"; dotenv.config(); -export abstract class StorageBlobTest extends PerfStressTest { +export abstract class StorageBlobTest extends PerfTest { blobServiceClient: ServiceURL; containerClient: ContainerURL; static containerName = generateUuid(); diff --git a/sdk/storage/perf-tests/storage-blob-track-1/test/upload.spec.ts b/sdk/storage/perf-tests/storage-blob-track-1/test/upload.spec.ts index f05614eaf923..95ca85734415 100644 --- a/sdk/storage/perf-tests/storage-blob-track-1/test/upload.spec.ts +++ b/sdk/storage/perf-tests/storage-blob-track-1/test/upload.spec.ts @@ -3,7 +3,7 @@ import { v4 as generateUuid } from "uuid"; import { Aborter, BlockBlobURL } from "@azure/storage-blob"; -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { StorageBlobTest } from "./storageTest.spec"; interface StorageBlobUploadTestOptions { size: number; @@ -13,7 +13,7 @@ export class StorageBlobUploadTest extends StorageBlobTest = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-blob/package.json b/sdk/storage/perf-tests/storage-blob/package.json index 15a6023f6091..2ebcbf2ab0c5 100644 --- a/sdk/storage/perf-tests/storage-blob/package.json +++ b/sdk/storage/perf-tests/storage-blob/package.json @@ -11,7 +11,7 @@ "@azure/core-http": "^2.0.0", "@azure/core-rest-pipeline": "^1.1.0", "@azure/storage-blob": "^12.8.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0", "uuid": "^8.3.0" }, diff --git a/sdk/storage/perf-tests/storage-blob/test/core-http.spec.ts b/sdk/storage/perf-tests/storage-blob/test/core-http.spec.ts index b46ecaf41f3c..aff17f7431b6 100644 --- a/sdk/storage/perf-tests/storage-blob/test/core-http.spec.ts +++ b/sdk/storage/perf-tests/storage-blob/test/core-http.spec.ts @@ -3,7 +3,7 @@ import { StorageBlobDownloadWithSASTest } from "./dowloadWithSAS.spec"; import { ServiceClient, WebResource } from "@azure/core-http"; -import { drainStream } from "@azure/test-utils-perfstress"; +import { drainStream } from "@azure/test-utils-perf"; export class CoreHTTPDownloadWithSASTest extends StorageBlobDownloadWithSASTest { client: ServiceClient; diff --git a/sdk/storage/perf-tests/storage-blob/test/core-rest-pipeline.spec.ts b/sdk/storage/perf-tests/storage-blob/test/core-rest-pipeline.spec.ts index dd2b494a0032..3de80a43f516 100644 --- a/sdk/storage/perf-tests/storage-blob/test/core-rest-pipeline.spec.ts +++ b/sdk/storage/perf-tests/storage-blob/test/core-rest-pipeline.spec.ts @@ -8,7 +8,7 @@ import { createPipelineRequest, PipelineRequest } from "@azure/core-rest-pipeline"; -import { drainStream } from "@azure/test-utils-perfstress"; +import { drainStream } from "@azure/test-utils-perf"; export class CoreHTTPSDownloadWithSASTest extends StorageBlobDownloadWithSASTest { client: HttpClient; diff --git a/sdk/storage/perf-tests/storage-blob/test/dowloadWithSAS.spec.ts b/sdk/storage/perf-tests/storage-blob/test/dowloadWithSAS.spec.ts index c3323cf5b0e5..baf44414e03d 100644 --- a/sdk/storage/perf-tests/storage-blob/test/dowloadWithSAS.spec.ts +++ b/sdk/storage/perf-tests/storage-blob/test/dowloadWithSAS.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary, getEnvVar, drainStream } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, getEnvVar, drainStream } from "@azure/test-utils-perf"; import { StorageBlobTest } from "./storageTest.spec"; import { BlockBlobClient, @@ -19,7 +19,7 @@ interface StorageBlobDownloadTestOptions { export class StorageBlobDownloadWithSASTest extends StorageBlobTest< StorageBlobDownloadTestOptions > { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-blob/test/download.spec.ts b/sdk/storage/perf-tests/storage-blob/test/download.spec.ts index 95591610d306..3070850babe9 100644 --- a/sdk/storage/perf-tests/storage-blob/test/download.spec.ts +++ b/sdk/storage/perf-tests/storage-blob/test/download.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { drainStream, PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { drainStream, PerfOptionDictionary } from "@azure/test-utils-perf"; import { StorageBlobTest } from "./storageTest.spec"; import { BlockBlobClient } from "@azure/storage-blob"; import { generateUuid } from "@azure/core-http"; @@ -11,7 +11,7 @@ interface StorageBlobDownloadTestOptions { } export class StorageBlobDownloadTest extends StorageBlobTest { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-blob/test/index.spec.ts b/sdk/storage/perf-tests/storage-blob/test/index.spec.ts index a6af3f477839..fc08017893e3 100644 --- a/sdk/storage/perf-tests/storage-blob/test/index.spec.ts +++ b/sdk/storage/perf-tests/storage-blob/test/index.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { StorageBlobDownloadTest } from "./download.spec"; import { StorageBlobUploadTest } from "./upload.spec"; import { StorageBlobUploadFileTest } from "./uploadFromFile.spec"; @@ -11,10 +11,10 @@ import { CoreHTTPDownloadWithSASTest } from "./core-http.spec"; import { NodeFetchDownloadWithSASTest } from "./node-fetch.spec"; import { CoreHTTPSDownloadWithSASTest } from "./core-rest-pipeline.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([ +const perfProgram = new PerfProgram( + selectPerfTest([ StorageBlobDownloadTest, StorageBlobUploadTest, StorageBlobUploadFileTest, @@ -26,4 +26,4 @@ const perfStressProgram = new PerfStressProgram( ]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/storage/perf-tests/storage-blob/test/listBlobs.spec.ts b/sdk/storage/perf-tests/storage-blob/test/listBlobs.spec.ts index 88070c3c8e7f..c157f109d070 100644 --- a/sdk/storage/perf-tests/storage-blob/test/listBlobs.spec.ts +++ b/sdk/storage/perf-tests/storage-blob/test/listBlobs.spec.ts @@ -2,14 +2,14 @@ // Licensed under the MIT license. import { generateUuid } from "@azure/core-http"; -import { PerfStressOptionDictionary, executeParallel } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, executeParallel } from "@azure/test-utils-perf"; import { StorageBlobTest } from "./storageTest.spec"; interface StorageBlobListTestOptions { count: number; } export class StorageBlobListTest extends StorageBlobTest { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { count: { required: true, description: "Number of blobs to be listed", diff --git a/sdk/storage/perf-tests/storage-blob/test/node-fetch.spec.ts b/sdk/storage/perf-tests/storage-blob/test/node-fetch.spec.ts index b44859c657ab..a65ac155cfb3 100644 --- a/sdk/storage/perf-tests/storage-blob/test/node-fetch.spec.ts +++ b/sdk/storage/perf-tests/storage-blob/test/node-fetch.spec.ts @@ -4,7 +4,7 @@ import { StorageBlobDownloadWithSASTest } from "./dowloadWithSAS.spec"; import node_fetch from "node-fetch"; import https from "https"; -import { drainStream } from "@azure/test-utils-perfstress"; +import { drainStream } from "@azure/test-utils-perf"; export class NodeFetchDownloadWithSASTest extends StorageBlobDownloadWithSASTest { agent: https.Agent; constructor() { diff --git a/sdk/storage/perf-tests/storage-blob/test/storageTest.spec.ts b/sdk/storage/perf-tests/storage-blob/test/storageTest.spec.ts index fc4d8d9c01fa..ebbe1cce3dee 100644 --- a/sdk/storage/perf-tests/storage-blob/test/storageTest.spec.ts +++ b/sdk/storage/perf-tests/storage-blob/test/storageTest.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { generateUuid } from "@azure/core-http"; -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { BlobServiceClient, ContainerClient, @@ -14,7 +14,7 @@ import { getValueInConnString } from "./utils/utils"; import * as dotenv from "dotenv"; dotenv.config(); -export abstract class StorageBlobTest extends PerfStressTest { +export abstract class StorageBlobTest extends PerfTest { blobServiceClient: BlobServiceClient; containerClient: ContainerClient; sharedKeyCredential: StorageSharedKeyCredential; diff --git a/sdk/storage/perf-tests/storage-blob/test/upload.spec.ts b/sdk/storage/perf-tests/storage-blob/test/upload.spec.ts index 3f057f9d618d..6ee36a2bdb21 100644 --- a/sdk/storage/perf-tests/storage-blob/test/upload.spec.ts +++ b/sdk/storage/perf-tests/storage-blob/test/upload.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { generateUuid } from "@azure/core-http"; -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { StorageBlobTest } from "./storageTest.spec"; interface StorageBlobUploadTestOptions { @@ -12,7 +12,7 @@ interface StorageBlobUploadTestOptions { export class StorageBlobUploadTest extends StorageBlobTest { blobName: string; buffer: Buffer; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-file-datalake/package.json b/sdk/storage/perf-tests/storage-file-datalake/package.json index bdcd6d69cc34..78efe52b8965 100644 --- a/sdk/storage/perf-tests/storage-file-datalake/package.json +++ b/sdk/storage/perf-tests/storage-file-datalake/package.json @@ -9,7 +9,7 @@ "license": "ISC", "dependencies": { "@azure/storage-file-datalake": "^12.7.1", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0", "uuid": "^8.3.0" }, diff --git a/sdk/storage/perf-tests/storage-file-datalake/test/append.spec.ts b/sdk/storage/perf-tests/storage-file-datalake/test/append.spec.ts index b1c57e2d1483..afe05cc6d9d5 100644 --- a/sdk/storage/perf-tests/storage-file-datalake/test/append.spec.ts +++ b/sdk/storage/perf-tests/storage-file-datalake/test/append.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { StorageDFSTest } from "./storageTest.spec"; import { DataLakeFileClient } from "@azure/storage-file-datalake"; import { v4 as generateUuid } from "uuid"; @@ -11,7 +11,7 @@ interface StorageDFSAppendTestOptions { export class StorageDFSAppendTest extends StorageDFSTest { buffer: Buffer; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size to append in bytes", diff --git a/sdk/storage/perf-tests/storage-file-datalake/test/index.spec.ts b/sdk/storage/perf-tests/storage-file-datalake/test/index.spec.ts index 930355e11fe0..8055807b1a3d 100644 --- a/sdk/storage/perf-tests/storage-file-datalake/test/index.spec.ts +++ b/sdk/storage/perf-tests/storage-file-datalake/test/index.spec.ts @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { StorageDFSAppendTest } from "./append.spec"; import { StorageDFSReadTest } from "./read.spec"; import { StorageDFSUploadTest } from "./upload.spec"; import { StorageDFSUploadFromFileTest } from "./uploadFromFile.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([ +const perfProgram = new PerfProgram( + selectPerfTest([ StorageDFSAppendTest, StorageDFSReadTest, StorageDFSUploadTest, @@ -18,4 +18,4 @@ const perfStressProgram = new PerfStressProgram( ]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/storage/perf-tests/storage-file-datalake/test/read.spec.ts b/sdk/storage/perf-tests/storage-file-datalake/test/read.spec.ts index 1c0904a1ab97..57e11be25924 100644 --- a/sdk/storage/perf-tests/storage-file-datalake/test/read.spec.ts +++ b/sdk/storage/perf-tests/storage-file-datalake/test/read.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { drainStream, PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { drainStream, PerfOptionDictionary } from "@azure/test-utils-perf"; import { StorageDFSTest } from "./storageTest.spec"; import { DataLakeFileClient } from "@azure/storage-file-datalake"; import { v4 as generateUuid } from "uuid"; @@ -10,7 +10,7 @@ interface StorageDFSReadTestOptions { } export class StorageDFSReadTest extends StorageDFSTest { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-file-datalake/test/storageTest.spec.ts b/sdk/storage/perf-tests/storage-file-datalake/test/storageTest.spec.ts index 113186ce89bf..7e7719c6aac7 100644 --- a/sdk/storage/perf-tests/storage-file-datalake/test/storageTest.spec.ts +++ b/sdk/storage/perf-tests/storage-file-datalake/test/storageTest.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { getEnvVar, PerfStressTest } from "@azure/test-utils-perfstress"; +import { getEnvVar, PerfTest } from "@azure/test-utils-perf"; import { DataLakeServiceClient, @@ -15,7 +15,7 @@ import * as dotenv from "dotenv"; import { v4 as generateUuid } from "uuid"; dotenv.config(); -export abstract class StorageDFSTest extends PerfStressTest { +export abstract class StorageDFSTest extends PerfTest { datalakeServiceClient: DataLakeServiceClient; fileSystemClient: DataLakeFileSystemClient; directoryClient: DataLakeDirectoryClient; diff --git a/sdk/storage/perf-tests/storage-file-datalake/test/upload.spec.ts b/sdk/storage/perf-tests/storage-file-datalake/test/upload.spec.ts index 45f426824138..6b386dd5b02a 100644 --- a/sdk/storage/perf-tests/storage-file-datalake/test/upload.spec.ts +++ b/sdk/storage/perf-tests/storage-file-datalake/test/upload.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { v4 as generateUuid } from "uuid"; -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { DataLakeFileClient } from "@azure/storage-file-datalake"; import { StorageDFSTest } from "./storageTest.spec"; @@ -13,7 +13,7 @@ interface StorageFileShareUploadTestOptions { export class StorageDFSUploadTest extends StorageDFSTest { buffer: Buffer; fileClient: DataLakeFileClient; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-file-share-track-1/package.json b/sdk/storage/perf-tests/storage-file-share-track-1/package.json index be137e99ef96..2f02bb32a108 100644 --- a/sdk/storage/perf-tests/storage-file-share-track-1/package.json +++ b/sdk/storage/perf-tests/storage-file-share-track-1/package.json @@ -9,7 +9,7 @@ "license": "ISC", "devDependencies": { "@azure/storage-file": "^10.3.0", - "@azure/test-utils-perfstress": "file:../../../test-utils/perfstress/azure-test-utils-perfstress-1.0.0.tgz", + "@azure/test-utils-perf": "file:../../../test-utils/perf/azure-test-utils-perf-1.0.0.tgz", "@types/uuid": "^8.0.0", "@types/node": "^12.0.0", "dotenv": "^8.2.0", diff --git a/sdk/storage/perf-tests/storage-file-share-track-1/test/download.spec.ts b/sdk/storage/perf-tests/storage-file-share-track-1/test/download.spec.ts index f55d585d8487..1fd3c5ddf3d8 100644 --- a/sdk/storage/perf-tests/storage-file-share-track-1/test/download.spec.ts +++ b/sdk/storage/perf-tests/storage-file-share-track-1/test/download.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary, drainStream } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, drainStream } from "@azure/test-utils-perf"; import { Aborter, FileURL } from "@azure/storage-file"; import { StorageFileShareTest } from "./storageTest"; import { generateUuid } from "@azure/core-http"; @@ -13,7 +13,7 @@ interface StorageFileShareDownloadTestOptions { export class StorageFileShareDownloadTest extends StorageFileShareTest< StorageFileShareDownloadTestOptions > { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-file-share-track-1/test/index.spec.ts b/sdk/storage/perf-tests/storage-file-share-track-1/test/index.spec.ts index 72e07bdb795e..547bc446dd55 100644 --- a/sdk/storage/perf-tests/storage-file-share-track-1/test/index.spec.ts +++ b/sdk/storage/perf-tests/storage-file-share-track-1/test/index.spec.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { StorageFileShareDownloadTest } from "./download.spec"; import { StorageFileShareUploadTest } from "./upload.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([StorageFileShareDownloadTest, StorageFileShareUploadTest]) +const perfProgram = new PerfProgram( + selectPerfTest([StorageFileShareDownloadTest, StorageFileShareUploadTest]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/storage/perf-tests/storage-file-share-track-1/test/storageTest.ts b/sdk/storage/perf-tests/storage-file-share-track-1/test/storageTest.ts index 85af4c849223..4572749b8398 100644 --- a/sdk/storage/perf-tests/storage-file-share-track-1/test/storageTest.ts +++ b/sdk/storage/perf-tests/storage-file-share-track-1/test/storageTest.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { ServiceURL, ShareURL, @@ -16,7 +16,7 @@ import * as dotenv from "dotenv"; import { generateUuid } from "@azure/core-http"; dotenv.config(); -export abstract class StorageFileShareTest extends PerfStressTest { +export abstract class StorageFileShareTest extends PerfTest { shareServiceClient: ServiceURL; shareClient: ShareURL; directoryClient: DirectoryURL; diff --git a/sdk/storage/perf-tests/storage-file-share-track-1/test/upload.spec.ts b/sdk/storage/perf-tests/storage-file-share-track-1/test/upload.spec.ts index ea921af7e12c..b0af193cabcb 100644 --- a/sdk/storage/perf-tests/storage-file-share-track-1/test/upload.spec.ts +++ b/sdk/storage/perf-tests/storage-file-share-track-1/test/upload.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { Aborter, FileURL } from "@azure/storage-file"; import { StorageFileShareTest } from "./storageTest"; import { generateUuid } from "@azure/core-http"; @@ -14,7 +14,7 @@ export class StorageFileShareUploadTest extends StorageFileShareTest< > { fileClient: FileURL; buffer: Buffer; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-file-share/package.json b/sdk/storage/perf-tests/storage-file-share/package.json index 8fe0ea023119..17888a9cd111 100644 --- a/sdk/storage/perf-tests/storage-file-share/package.json +++ b/sdk/storage/perf-tests/storage-file-share/package.json @@ -9,7 +9,7 @@ "license": "ISC", "dependencies": { "@azure/storage-file-share": "^12.8.1", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0", "uuid": "^8.3.0" }, diff --git a/sdk/storage/perf-tests/storage-file-share/test/download.spec.ts b/sdk/storage/perf-tests/storage-file-share/test/download.spec.ts index e8c3b7ede38d..8d6f827a9398 100644 --- a/sdk/storage/perf-tests/storage-file-share/test/download.spec.ts +++ b/sdk/storage/perf-tests/storage-file-share/test/download.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { v4 as generateUuid } from "uuid"; -import { PerfStressOptionDictionary, drainStream } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, drainStream } from "@azure/test-utils-perf"; import { ShareFileClient } from "@azure/storage-file-share"; import { StorageFileShareTest } from "./storageTest.spec"; @@ -13,7 +13,7 @@ interface StorageFileShareDownloadTestOptions { export class StorageFileShareDownloadTest extends StorageFileShareTest< StorageFileShareDownloadTestOptions > { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-file-share/test/downloadToFile.spec.ts b/sdk/storage/perf-tests/storage-file-share/test/downloadToFile.spec.ts index e68b87d86534..53b327426dc2 100644 --- a/sdk/storage/perf-tests/storage-file-share/test/downloadToFile.spec.ts +++ b/sdk/storage/perf-tests/storage-file-share/test/downloadToFile.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { ShareFileClient } from "@azure/storage-file-share"; import fs from "fs"; import util from "util"; @@ -20,7 +20,7 @@ const localDirName = "temp"; export class StorageFileShareDownloadToFileTest extends StorageFileShareTest< StorageFileShareDownloadTestOptions > { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-file-share/test/index.spec.ts b/sdk/storage/perf-tests/storage-file-share/test/index.spec.ts index 5a69ef5a9e80..497e6b8768bb 100644 --- a/sdk/storage/perf-tests/storage-file-share/test/index.spec.ts +++ b/sdk/storage/perf-tests/storage-file-share/test/index.spec.ts @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { StorageFileShareDownloadTest } from "./download.spec"; import { StorageFileShareDownloadToFileTest } from "./downloadToFile.spec"; import { StorageFileShareUploadTest } from "./upload.spec"; import { StorageFileShareUploadFromFileTest } from "./uploadFromFile.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([ +const perfProgram = new PerfProgram( + selectPerfTest([ StorageFileShareDownloadTest, StorageFileShareDownloadToFileTest, StorageFileShareUploadTest, @@ -18,4 +18,4 @@ const perfStressProgram = new PerfStressProgram( ]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/storage/perf-tests/storage-file-share/test/storageTest.spec.ts b/sdk/storage/perf-tests/storage-file-share/test/storageTest.spec.ts index 691708cdab0c..ac72475bc389 100644 --- a/sdk/storage/perf-tests/storage-file-share/test/storageTest.spec.ts +++ b/sdk/storage/perf-tests/storage-file-share/test/storageTest.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { ShareClient, ShareDirectoryClient, ShareServiceClient } from "@azure/storage-file-share"; @@ -10,7 +10,7 @@ import * as dotenv from "dotenv"; import { v4 as generateUuid } from "uuid"; dotenv.config(); -export abstract class StorageFileShareTest extends PerfStressTest { +export abstract class StorageFileShareTest extends PerfTest { shareServiceClient: ShareServiceClient; shareClient: ShareClient; directoryClient: ShareDirectoryClient; diff --git a/sdk/storage/perf-tests/storage-file-share/test/upload.spec.ts b/sdk/storage/perf-tests/storage-file-share/test/upload.spec.ts index b97a8a6ec5dd..41b3b0410c67 100644 --- a/sdk/storage/perf-tests/storage-file-share/test/upload.spec.ts +++ b/sdk/storage/perf-tests/storage-file-share/test/upload.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { v4 as generateUuid } from "uuid"; -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { ShareFileClient } from "@azure/storage-file-share"; import { StorageFileShareTest } from "./storageTest.spec"; @@ -15,7 +15,7 @@ export class StorageFileShareUploadTest extends StorageFileShareTest< > { fileClient: ShareFileClient; buffer: Buffer; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/perf-tests/storage-file-share/test/uploadFromFile.spec.ts b/sdk/storage/perf-tests/storage-file-share/test/uploadFromFile.spec.ts index e6de30e793da..9c298973fa9d 100644 --- a/sdk/storage/perf-tests/storage-file-share/test/uploadFromFile.spec.ts +++ b/sdk/storage/perf-tests/storage-file-share/test/uploadFromFile.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { v4 as generateUuid } from "uuid"; -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import fs from "fs"; import util from "util"; import { ShareFileClient } from "@azure/storage-file-share"; @@ -23,7 +23,7 @@ export class StorageFileShareUploadFromFileTest extends StorageFileShareTest< StorageFileShareUploadFromFileTestOptions > { fileClient: ShareFileClient; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { size: { required: true, description: "Size in bytes", diff --git a/sdk/storage/storage-blob/package.json b/sdk/storage/storage-blob/package.json index 47c75b8bf5e5..0dd781087567 100644 --- a/sdk/storage/storage-blob/package.json +++ b/sdk/storage/storage-blob/package.json @@ -141,7 +141,7 @@ "@azure/identity": "2.0.0-beta.6", "@azure/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^1.0.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "@microsoft/api-extractor": "^7.18.11", "@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-replace": "^2.2.0", diff --git a/sdk/storage/storage-blob/tsconfig.json b/sdk/storage/storage-blob/tsconfig.json index 30ee4ab31057..b72f82a1c9d2 100644 --- a/sdk/storage/storage-blob/tsconfig.json +++ b/sdk/storage/storage-blob/tsconfig.json @@ -12,7 +12,7 @@ "../storage-internal-avro/node_modules", "../storage-common/node_modules", "./samples/**", - "test/perfstress/track-1/" + "test/perf/track-1/" ], "include": [ "./src/**/*.ts", diff --git a/sdk/storage/storage-file-datalake/package.json b/sdk/storage/storage-file-datalake/package.json index b00b4aff1900..5e918757fc69 100644 --- a/sdk/storage/storage-file-datalake/package.json +++ b/sdk/storage/storage-file-datalake/package.json @@ -120,7 +120,7 @@ "@azure/identity": "2.0.0-beta.6", "@azure/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^1.0.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "@microsoft/api-extractor": "^7.18.11", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", diff --git a/sdk/storage/storage-file-share/package.json b/sdk/storage/storage-file-share/package.json index 09befca9461e..c38ddeb64dd7 100644 --- a/sdk/storage/storage-file-share/package.json +++ b/sdk/storage/storage-file-share/package.json @@ -127,7 +127,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^1.0.0", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "@microsoft/api-extractor": "^7.18.11", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-multi-entry": "^3.0.0", diff --git a/sdk/tables/perf-tests/data-tables/package.json b/sdk/tables/perf-tests/data-tables/package.json index 0ca668b94aad..7dcf010983f8 100644 --- a/sdk/tables/perf-tests/data-tables/package.json +++ b/sdk/tables/perf-tests/data-tables/package.json @@ -9,7 +9,7 @@ "license": "ISC", "dependencies": { "@azure/data-tables": "^12.1.2", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0", "uuid": "^8.3.0" }, diff --git a/sdk/tables/perf-tests/data-tables/test/createComplexEntity.spec.ts b/sdk/tables/perf-tests/data-tables/test/createComplexEntity.spec.ts index 00b457e4b424..b108590b4957 100644 --- a/sdk/tables/perf-tests/data-tables/test/createComplexEntity.spec.ts +++ b/sdk/tables/perf-tests/data-tables/test/createComplexEntity.spec.ts @@ -1,10 +1,10 @@ -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { TablesTest } from "./tables.spec"; import { TableEntity } from "@azure/data-tables"; import { createComplexEntity } from "./utils/createBaseEntity"; export class CreateComplexEntityTest extends TablesTest { - public options: PerfStressOptionDictionary = {}; + public options: PerfOptionDictionary = {}; constructor() { super("ComplexEntityPerf"); diff --git a/sdk/tables/perf-tests/data-tables/test/createComplexEntityBatchTest.spec.ts b/sdk/tables/perf-tests/data-tables/test/createComplexEntityBatchTest.spec.ts index c5a35f87e507..3894e30ce820 100644 --- a/sdk/tables/perf-tests/data-tables/test/createComplexEntityBatchTest.spec.ts +++ b/sdk/tables/perf-tests/data-tables/test/createComplexEntityBatchTest.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { TablesTest } from "./tables.spec"; import { TransactionAction } from "@azure/data-tables"; import { createBatch } from "./utils/createBaseEntity"; @@ -10,7 +10,7 @@ interface TablesCreateComplexEntityBatchTestOptions { export class CreateComplexEntityBatchTest extends TablesTest< TablesCreateComplexEntityBatchTestOptions > { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { batchSize: { defaultValue: 100, longName: "batchSize", diff --git a/sdk/tables/perf-tests/data-tables/test/createSimpleEntity.spec.ts b/sdk/tables/perf-tests/data-tables/test/createSimpleEntity.spec.ts index af79ca4a6e15..2ae5b43c853a 100644 --- a/sdk/tables/perf-tests/data-tables/test/createSimpleEntity.spec.ts +++ b/sdk/tables/perf-tests/data-tables/test/createSimpleEntity.spec.ts @@ -1,10 +1,10 @@ -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { TablesTest } from "./tables.spec"; import { TableEntity } from "@azure/data-tables"; import { createSimpleEntity } from "./utils/createBaseEntity"; export class CreateSimpleEntityTest extends TablesTest { - public options: PerfStressOptionDictionary = {}; + public options: PerfOptionDictionary = {}; constructor() { super("SimpleEntityPerf"); diff --git a/sdk/tables/perf-tests/data-tables/test/createSimpleEntityBatchTest.spec.ts b/sdk/tables/perf-tests/data-tables/test/createSimpleEntityBatchTest.spec.ts index 0c78a6a743f9..d5d25f142d63 100644 --- a/sdk/tables/perf-tests/data-tables/test/createSimpleEntityBatchTest.spec.ts +++ b/sdk/tables/perf-tests/data-tables/test/createSimpleEntityBatchTest.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { TablesTest } from "./tables.spec"; import { TransactionAction } from "@azure/data-tables"; import { createBatch } from "./utils/createBaseEntity"; @@ -10,7 +10,7 @@ interface TablesCreateSimpleEntityBatchTestOptions { export class CreateSimpleEntityBatchTest extends TablesTest< TablesCreateSimpleEntityBatchTestOptions > { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { batchSize: { defaultValue: 100, longName: "batchSize", diff --git a/sdk/tables/perf-tests/data-tables/test/index.spec.ts b/sdk/tables/perf-tests/data-tables/test/index.spec.ts index 8af21af5ade7..16ec1671af6f 100644 --- a/sdk/tables/perf-tests/data-tables/test/index.spec.ts +++ b/sdk/tables/perf-tests/data-tables/test/index.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { CreateSimpleEntityTest } from "./createSimpleEntity.spec"; import { CreateSimpleEntityBatchTest } from "./createSimpleEntityBatchTest.spec"; import { CreateComplexEntityTest } from "./createComplexEntity.spec"; @@ -11,10 +11,10 @@ import * as dotenv from "dotenv"; dotenv.config(); -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([ +const perfProgram = new PerfProgram( + selectPerfTest([ CreateSimpleEntityTest, CreateSimpleEntityBatchTest, CreateComplexEntityTest, @@ -24,4 +24,4 @@ const perfStressProgram = new PerfStressProgram( ]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/tables/perf-tests/data-tables/test/listComplexEntities.spec.ts b/sdk/tables/perf-tests/data-tables/test/listComplexEntities.spec.ts index 8836db555fff..80f626f5a783 100644 --- a/sdk/tables/perf-tests/data-tables/test/listComplexEntities.spec.ts +++ b/sdk/tables/perf-tests/data-tables/test/listComplexEntities.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { TablesTest } from "./tables.spec"; import { TableEntityResult, TransactionAction } from "@azure/data-tables"; import { createBatch } from "./utils/createBaseEntity"; @@ -8,7 +8,7 @@ interface ListComplexEntitiesTestOptions { } export class ListComplexEntitiesTest extends TablesTest { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { entityCount: { defaultValue: 100, longName: "entityCount", diff --git a/sdk/tables/perf-tests/data-tables/test/listSimpleEntities.spec.ts b/sdk/tables/perf-tests/data-tables/test/listSimpleEntities.spec.ts index a00c937308a0..cf90116d81af 100644 --- a/sdk/tables/perf-tests/data-tables/test/listSimpleEntities.spec.ts +++ b/sdk/tables/perf-tests/data-tables/test/listSimpleEntities.spec.ts @@ -1,4 +1,4 @@ -import { PerfStressOptionDictionary } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary } from "@azure/test-utils-perf"; import { TablesTest } from "./tables.spec"; import { TableEntityResult, TransactionAction } from "@azure/data-tables"; import { createBatch } from "./utils/createBaseEntity"; @@ -8,7 +8,7 @@ interface ListSimpleEntitiesTestOptions { } export class ListSimpleEntitiesTest extends TablesTest { - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { entityCount: { defaultValue: 100, longName: "entityCount", diff --git a/sdk/tables/perf-tests/data-tables/test/tables.spec.ts b/sdk/tables/perf-tests/data-tables/test/tables.spec.ts index af460e40b584..c78012d78425 100644 --- a/sdk/tables/perf-tests/data-tables/test/tables.spec.ts +++ b/sdk/tables/perf-tests/data-tables/test/tables.spec.ts @@ -1,8 +1,8 @@ -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { TableClient } from "@azure/data-tables"; -export abstract class TablesTest> extends PerfStressTest< +export abstract class TablesTest> extends PerfTest< TOptions > { client: TableClient; diff --git a/sdk/test-utils/perfstress/.dockerignore b/sdk/test-utils/perf/.dockerignore similarity index 100% rename from sdk/test-utils/perfstress/.dockerignore rename to sdk/test-utils/perf/.dockerignore diff --git a/sdk/test-utils/perfstress/CHANGELOG.md b/sdk/test-utils/perf/CHANGELOG.md similarity index 84% rename from sdk/test-utils/perfstress/CHANGELOG.md rename to sdk/test-utils/perf/CHANGELOG.md index 06b7266c85e9..1a2128fc8b36 100644 --- a/sdk/test-utils/perfstress/CHANGELOG.md +++ b/sdk/test-utils/perf/CHANGELOG.md @@ -21,7 +21,7 @@ ### 2021-09-24 -- Instead of using the cached proxy-clients(to leverage the proxy-tool), we now get a new client for each of the instantiated PerfStressTest classes. [#17832](https://github.com/Azure/azure-sdk-for-js/pull/17832) +- Instead of using the cached proxy-clients(to leverage the proxy-tool), we now get a new client for each of the instantiated PerfTest classes. [#17832](https://github.com/Azure/azure-sdk-for-js/pull/17832) ### 2021-09-23 @@ -39,8 +39,8 @@ ### 2021-07-14 -- Removed the run method in the `PerfStressTest` class as we only deal with the async methods when it comes to performance. +- Removed the run method in the `PerfTest` class as we only deal with the async methods when it comes to performance. ### 2020-04-22 -- Merged the first working implementation of perfstress. +- Merged the first working implementation of perf. diff --git a/sdk/test-utils/perfstress/Dockerfile b/sdk/test-utils/perf/Dockerfile similarity index 100% rename from sdk/test-utils/perfstress/Dockerfile rename to sdk/test-utils/perf/Dockerfile diff --git a/sdk/test-utils/perfstress/GettingStarted.md b/sdk/test-utils/perf/GettingStarted.md similarity index 93% rename from sdk/test-utils/perfstress/GettingStarted.md rename to sdk/test-utils/perf/GettingStarted.md index 9d47b72f7a33..64dc53d23ff0 100644 --- a/sdk/test-utils/perfstress/GettingStarted.md +++ b/sdk/test-utils/perf/GettingStarted.md @@ -40,16 +40,16 @@ To add perf tests for the `sdk//` package, follow the step 3. Tests will live under `sdk//perf-tests//test` 4. Add a `package.json` such as [example-perf-package.json](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/perf-tests/storage-file-datalake/package.json) at `sdk//perf-tests/` folder. - Make sure to import your `` and the `test-utils-perfstress` project. + Make sure to import your `` and the `test-utils-perf` project. ```json "dependencies": { "@azure/": "^", - "@azure/test-utils-perfstress": "^1.0.0" + "@azure/test-utils-perf": "^1.0.0" } ``` - _Note: `"@azure/test-utils-perfstress"` is not a published npm package._ + _Note: `"@azure/test-utils-perf"` is not a published npm package._ Set the name of the package and mark it as private. @@ -93,12 +93,12 @@ To add perf tests for the `sdk//` package, follow the step 3. Add a `package.json` such as [example-track-1-perf-package.json](https://github.com/Azure/azure-sdk-for-js/blob/fe9b1e5a50946f53b6491d7f67b2420d8ee1b229/sdk/storage/perf-tests/storage-blob-track-1/package.json) at `sdk//perf-tests/` folder. - Make sure to import your `` and the `test-utils-perfstress` project. + Make sure to import your `` and the `test-utils-perf` project. ```json "dependencies": { "@azure/": "^", - "@azure/test-utils-perfstress": "file:../../../test-utils/perfstress/azure-test-utils-perfstress-1.0.0.tgz", + "@azure/test-utils-perf": "file:../../../test-utils/perf/azure-test-utils-perf-1.0.0.tgz", } ``` @@ -131,7 +131,7 @@ To add perf tests for the `sdk//` package, follow the step Add an `index.spec.ts` at `sdk//perf-tests//test/`. ```js -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { `ServiceNameAPI1Name`Test } from "./api1-name.spec"; import { `ServiceNameAPI2Name`Test } from "./api2-name.spec"; @@ -139,11 +139,11 @@ import { `ServiceNameAPI2Name`Test } from "./api2-name.spec"; import * as dotenv from "dotenv"; dotenv.config(); -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram(selectPerfStressTest([`ServiceNameAPIName`Test, `ServiceNameAPIName2`Test])); +const perfProgram = new PerfProgram(selectPerfTest([`ServiceNameAPIName`Test, `ServiceNameAPIName2`Test])); -perfStressProgram.run(); +perfProgram.run(); ``` ### [Base Class](#base-class) @@ -153,12 +153,12 @@ Base class would have all the common code that would be repeated for each of the Create a new file such as `serviceName.spec.ts` at `sdk//perf-tests//test/`. ```js -import { PerfStressTest, getEnvVar } from "@azure/test-utils-perfstress"; +import { PerfTest, getEnvVar } from "@azure/test-utils-perf"; import { ServiceNameClient } from "@azure/"; -export abstract class `ServiceName`Test extends PerfStressTest { +export abstract class `ServiceName`Test extends PerfTest { serviceNameClient: ServiceNameClient; constructor() { @@ -182,12 +182,12 @@ Following code shows how the individual perf test files would look like. ```js import { ServiceNameClient } from "@azure/"; -import { PerfStressOptionDictionary, drainStream } from "@azure/test-utils-perfstress"; +import { PerfOptionDictionary, drainStream } from "@azure/test-utils-perf"; import { `ServiceName`Test } from "./serviceNameTest.spec"; export class `ServiceNameAPIName`Test extends ServiceNameTest { // The next section talks about the custom options that you can provide for a test - public options: PerfStressOptionDictionary = {}; + public options: PerfOptionDictionary = {}; serviceNameClient: `ServiceName`Client; @@ -221,7 +221,7 @@ interface `ServiceNameAPIName`TestOptions { } export class `ServiceNameAPIName`Test extends ServiceNameTest<`ServiceNameAPIName`TestOptions> { - public options: PerfStressOptionDictionary<`ServiceNameAPIName`TestOptions> = { + public options: PerfOptionDictionary<`ServiceNameAPIName`TestOptions> = { newOption: { required: true, description: "A new option", diff --git a/sdk/test-utils/perfstress/LICENSE b/sdk/test-utils/perf/LICENSE similarity index 100% rename from sdk/test-utils/perfstress/LICENSE rename to sdk/test-utils/perf/LICENSE diff --git a/sdk/test-utils/perfstress/README.md b/sdk/test-utils/perf/README.md similarity index 64% rename from sdk/test-utils/perfstress/README.md rename to sdk/test-utils/perf/README.md index b9812bf4631e..2a6b26e6408d 100644 --- a/sdk/test-utils/perfstress/README.md +++ b/sdk/test-utils/perf/README.md @@ -1,18 +1,18 @@ -# Azure PerfStress library for JavaScript +# Azure Perf library for JavaScript ## Getting started -To start a new perf test project for the your SDK in the js repository, follow the steps in the [GettingStarted.md](https://github.com/Azure/azure-sdk-for-js/blob/c1c5f556a1a29d4a38019f1cc97fadb99375d6d5/sdk/test-utils/perfstress/GettingStarted.md). +To start a new perf test project for the your SDK in the js repository, follow the steps in the [GettingStarted.md](https://github.com/Azure/azure-sdk-for-js/blob/c1c5f556a1a29d4a38019f1cc97fadb99375d6d5/sdk/test-utils/perf/GettingStarted.md). Link to the wiki - [Writing-Performance-Tests](https://github.com/Azure/azure-sdk-for-js/wiki/Writing-Performance-Tests) (has the same contents as the GettingStarted docs) ## KeyConcepts -- A **PerfStressTest** test is a test that will be executed repeatedly to show both the performance of the program, and how it behaves under stress. +- A **PerfTest** test is a test that will be executed repeatedly to show both the performance of the program, and how it behaves under stress. - Tests have an asynchronous method called `runAsync` which is executed based on the duration, iterations, and parallel options provided for the perf test. More about options below. -- A **PerfStressOption** is a command line parameter. We use `minimist` to parse them appropriately, and then to consolidate them in a dictionary of options that is called `PerfStressOptionDictionary`. The dictionary class accepts a union type of strings that defines the options that are allowed by each test. -- Some default options are parsed by the PerfStress program. Their longer names are: `help`, `no-cleanups`, `parallel`, `duration`, `warmup`, `iterations`, `no-cleanup` and `milliseconds-to-log`. -- PerfStress tests are executed as many times as possible until the `duration` parameter is specified. This process may repeat as many `iterations` are given. Before each iteration, tests might be called for a period of time up to `warmup`, to adjust to possible runtime optimizations. In each iteration, as many as `parallel` instances of the same test are called without waiting for each other, letting the event loop decide which one is prioritized (it's not true parallelism, but it's an approximation that aligns with the design in other languages, we might improve it over time). +- A **PerfOption** is a command line parameter. We use `minimist` to parse them appropriately, and then to consolidate them in a dictionary of options that is called `PerfOptionDictionary`. The dictionary class accepts a union type of strings that defines the options that are allowed by each test. +- Some default options are parsed by the Perf program. Their longer names are: `help`, `no-cleanups`, `parallel`, `duration`, `warmup`, `iterations`, `no-cleanup` and `milliseconds-to-log`. +- Perf tests are executed as many times as possible until the `duration` parameter is specified. This process may repeat as many `iterations` are given. Before each iteration, tests might be called for a period of time up to `warmup`, to adjust to possible runtime optimizations. In each iteration, as many as `parallel` instances of the same test are called without waiting for each other, letting the event loop decide which one is prioritized (it's not true parallelism, but it's an approximation that aligns with the design in other languages, we might improve it over time). - Each test can have a `globalSetup` method, which is called once before the process begins, a `globalCleanup` method, which is called once after the process finishes. - Each test can have a `setup` method, which is called as many times as test instances are created (up to `parallel`), and help specify local state for each test instance. A `cleanup` method is also optional, called the same amount of times, but after finishing running the tests. - `test-proxies` url option - this option can be leveraged to avoid hitting throttling scenarios while testing the services. This option lets the requests go through proxy server(s) based on the url(s) provided, we run runAsync method once in record mode to save the requests and responses in memory and then a ton of times in playback. Workflow with the test-proxies below. @@ -43,7 +43,7 @@ Steps below constitute the workflow of a typical perf test. ## Examples -Check the [test folder](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perfstress/test/). +Check the [test folder](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perf/test/). ## Troubleshooting @@ -51,12 +51,12 @@ TODO ## Next steps -Check the [source](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perfstress/src/) folder and the [test folder](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perfstress/test/). +Check the [source](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perf/src/) folder and the [test folder](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/perf/test/). -Also check the PerfStress EPIC, here: https://github.com/Azure/azure-sdk-for-js/issues/8057 +Also check the Perf EPIC, here: https://github.com/Azure/azure-sdk-for-js/issues/8057 ## Contributing If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Ftest-utils%2Fperfstress%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Ftest-utils%2Fperf%2FREADME.png) diff --git a/sdk/test-utils/perf/build.ps1 b/sdk/test-utils/perf/build.ps1 new file mode 100644 index 000000000000..eb26cd9c04a4 --- /dev/null +++ b/sdk/test-utils/perf/build.ps1 @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +docker build -t azure-sdk-for-js-perf -f Dockerfile ../../../ diff --git a/sdk/test-utils/perfstress/karma.conf.js b/sdk/test-utils/perf/karma.conf.js similarity index 100% rename from sdk/test-utils/perfstress/karma.conf.js rename to sdk/test-utils/perf/karma.conf.js diff --git a/sdk/test-utils/perfstress/package.json b/sdk/test-utils/perf/package.json similarity index 94% rename from sdk/test-utils/perfstress/package.json rename to sdk/test-utils/perf/package.json index df62c99409a5..584b382dc727 100644 --- a/sdk/test-utils/perfstress/package.json +++ b/sdk/test-utils/perf/package.json @@ -1,5 +1,5 @@ { - "name": "@azure/test-utils-perfstress", + "name": "@azure/test-utils-perf", "version": "1.0.0", "sdk-type": "client", "description": "Performance and stress test framework for the Azure SDK for JavaScript and TypeScript", @@ -22,7 +22,7 @@ "integration-test:node": "node dist-esm/test/index.spec.js", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint --no-eslintrc -c ../../.eslintrc.internal.json package.json src test --ext .ts --fix --fix-type [problem,suggestion]", - "lint": "eslint --no-eslintrc -c ../../.eslintrc.internal.json package.json src test --ext .ts -f html -o perfstress-lintReport.html || exit 0", + "lint": "eslint --no-eslintrc -c ../../.eslintrc.internal.json package.json src test --ext .ts -f html -o perf-lintReport.html || exit 0", "pack": "npm pack 2>&1", "perf-test:node": "npm run build && node dist-esm/test/index.spec.js", "unit-test:browser": "echo skipped", @@ -55,7 +55,7 @@ "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/test-utils/perfstress/README.md", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/test-utils/perf/README.md", "sideEffects": false, "private": true, "dependencies": { diff --git a/sdk/test-utils/perf/run.ps1 b/sdk/test-utils/perf/run.ps1 new file mode 100644 index 000000000000..75a0bb9e6b56 --- /dev/null +++ b/sdk/test-utils/perf/run.ps1 @@ -0,0 +1,3 @@ +#!/usr/bin/env pwsh + +docker run -it --rm --network host system-perf-net @args diff --git a/sdk/test-utils/perfstress/runAllTests.sh b/sdk/test-utils/perf/runAllTests.sh similarity index 84% rename from sdk/test-utils/perfstress/runAllTests.sh rename to sdk/test-utils/perf/runAllTests.sh index 81652ec30bb2..1fb98710d1ef 100755 --- a/sdk/test-utils/perfstress/runAllTests.sh +++ b/sdk/test-utils/perf/runAllTests.sh @@ -10,4 +10,4 @@ npm run perf-test:node -- SetupCleanupTest --warmup 2 --duration 4 --iterations npm run perf-test:node -- Delay500ms --warmup 2 --duration 4 --iterations 2 npm run perf-test:node -- Exception --warmup 2 --duration 4 --iterations 2 npm run perf-test:node -- Exception --warmup 2 --duration 4 --iterations 2 --sync -npm run perf-test:node -- PerfStressPolicyTest --warmup 2 --duration 4 --iterations 2 --url http://my-host.com/ +npm run perf-test:node -- PerfPolicyTest --warmup 2 --duration 4 --iterations 2 --url http://my-host.com/ diff --git a/sdk/test-utils/perfstress/src/index.ts b/sdk/test-utils/perf/src/index.ts similarity index 100% rename from sdk/test-utils/perfstress/src/index.ts rename to sdk/test-utils/perf/src/index.ts diff --git a/sdk/test-utils/perfstress/src/options.ts b/sdk/test-utils/perf/src/options.ts similarity index 85% rename from sdk/test-utils/perfstress/src/options.ts rename to sdk/test-utils/perf/src/options.ts index 36bf2cfc82f9..f7a35ac49247 100644 --- a/sdk/test-utils/perfstress/src/options.ts +++ b/sdk/test-utils/perf/src/options.ts @@ -5,7 +5,7 @@ import { default as minimist, ParsedArgs as MinimistParsedArgs } from "minimist" import { isDefined } from "./utils"; /** - * The structure of a PerfStress option. They represent command line parameters. + * The structure of a Perf option. They represent command line parameters. */ export interface OptionDetails { /** @@ -21,7 +21,7 @@ export interface OptionDetails { /** * The longName represents a command line argument that is usually longer than the shortName, * and when sent through the command line, it should have two dashes `--` before the longName specified. - * Options don't need to define longName, since it will be derived from the properties PerfStressOptionDictionary. + * Options don't need to define longName, since it will be derived from the properties PerfOptionDictionary. */ longName?: string; /** @@ -43,22 +43,22 @@ export interface OptionDetails { } /** - * A group of options is called PerfStressOptionDictionary, + * A group of options is called PerfOptionDictionary, * and is shaped as a plain object to make it easier to access them. * * `keyof TOptions` provides the names of the options. This is necessary to allow TypeScript to suggest the appropriate names * for the options and parsedOptions. */ -export type PerfStressOptionDictionary = { +export type PerfOptionDictionary = { [longName in keyof TOptions]: OptionDetails; }; /** * These represent the default options the tests can assume. * - * @interface DefaultPerfStressOptions + * @interface DefaultPerfOptions */ -export interface DefaultPerfStressOptions { +export interface DefaultPerfOptions { help: string; parallel: number; duration: number; @@ -73,7 +73,7 @@ export interface DefaultPerfStressOptions { /** * These are the default options in full. */ -export const defaultPerfStressOptions: PerfStressOptionDictionary = { +export const defaultPerfOptions: PerfOptionDictionary = { help: { description: "Shows all of the available options", shortName: "h" @@ -125,14 +125,14 @@ export const defaultPerfStressOptions: PerfStressOptionDictionary( - options: PerfStressOptionDictionary -): Required> { +export function parsePerfOption( + options: PerfOptionDictionary +): Required> { const minimistResult: MinimistParsedArgs = minimist( process.argv, getBooleanOptionDetails(options) ); - const result: Partial> = {}; + const result: Partial> = {}; for (const longName of Object.keys(options)) { // This cast is needed since we're picking up options from process.argv @@ -150,7 +150,7 @@ export function parsePerfStressOption( if (required && !isDefined(value)) { throw new Error(`Option ${longName} is required`); } - // Options don't need to define longName, it can be derived from the properties PerfStressOptionDictionary. + // Options don't need to define longName, it can be derived from the properties PerfOptionDictionary. result[longName as keyof TOptions] = { ...option, longName, @@ -158,10 +158,10 @@ export function parsePerfStressOption( }; } - return result as Required>; + return result as Required>; } -function getBooleanOptionDetails(options: PerfStressOptionDictionary) { +function getBooleanOptionDetails(options: PerfOptionDictionary) { let booleanProps: { boolean: string[]; default: { [key: string]: boolean } } = { boolean: [], default: {} diff --git a/sdk/test-utils/perfstress/src/parallel.ts b/sdk/test-utils/perf/src/parallel.ts similarity index 94% rename from sdk/test-utils/perfstress/src/parallel.ts rename to sdk/test-utils/perf/src/parallel.ts index 453499e35ef1..10a88c14ba45 100644 --- a/sdk/test-utils/perfstress/src/parallel.ts +++ b/sdk/test-utils/perf/src/parallel.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. /** - * PerfStressParallel helps keep track of the total completed operations + * PerfParallel helps keep track of the total completed operations * and the last milliseconds elapsed on each parallel call. * * In languages supporting threads, "parallels" mean new threads created in which we run @@ -11,7 +11,7 @@ * promises that are executed one after the other without waiting for the previous one to finish. * We wait for all of the promises to resolve to consider the "parallel" execution finished. */ -export interface PerfStressParallel { +export interface PerfParallel { /** * Tracks the number of completed operations during a given parallel call. */ diff --git a/sdk/test-utils/perfstress/src/policy.ts b/sdk/test-utils/perf/src/policy.ts similarity index 96% rename from sdk/test-utils/perfstress/src/policy.ts rename to sdk/test-utils/perf/src/policy.ts index c259da90607b..8d7ca323d03f 100644 --- a/sdk/test-utils/perfstress/src/policy.ts +++ b/sdk/test-utils/perf/src/policy.ts @@ -12,7 +12,7 @@ import * as url from "url"; * any targeted URL. The original host is kept as a header * on the outgoing request. */ -export class PerfStressPolicy extends BaseRequestPolicy { +export class PerfPolicy extends BaseRequestPolicy { private host: string; private port?: string | null; diff --git a/sdk/test-utils/perfstress/src/program.ts b/sdk/test-utils/perf/src/program.ts similarity index 89% rename from sdk/test-utils/perfstress/src/program.ts rename to sdk/test-utils/perf/src/program.ts index fc31eec6d993..c0f29bb9b032 100644 --- a/sdk/test-utils/perfstress/src/program.ts +++ b/sdk/test-utils/perf/src/program.ts @@ -2,43 +2,43 @@ // Licensed under the MIT license. import { AbortController } from "@azure/abort-controller"; -import { PerfStressTest, PerfStressTestConstructor } from "./tests"; +import { PerfTest, PerfTestConstructor } from "./tests"; import { - PerfStressOptionDictionary, - parsePerfStressOption, - defaultPerfStressOptions, - DefaultPerfStressOptions + PerfOptionDictionary, + parsePerfOption, + defaultPerfOptions, + DefaultPerfOptions } from "./options"; -import { PerfStressParallel } from "./parallel"; +import { PerfParallel } from "./parallel"; import { TestProxyHttpClientV1, TestProxyHttpClient } from "./testProxyHttpClient"; export type TestType = ""; /** - * PerfStressProgram - * receives a class extending PerfStressTest with specific command line parameter names (or just "string"), + * PerfProgram + * receives a class extending PerfTest with specific command line parameter names (or just "string"), * then gets the test ready for a performance/stress test run. * * Use it like: * * ```ts - * export class Delay500ms extends PerfStressTest { + * export class Delay500ms extends PerfTest { * public options = {}; * async run(): Promise { * await delay(500); * } * } * - * const perfStressProgram = new PerfStressProgram(Delay500ms); + * const perfProgram = new PerfProgram(Delay500ms); * - * perfStressProgram.run(); + * perfProgram.run(); * ``` */ -export class PerfStressProgram { +export class PerfProgram { private testName: string; - private parsedDefaultOptions: Required>; + private parsedDefaultOptions: Required>; private parallelNumber: number; - private tests: PerfStressTest[]; + private tests: PerfTest[]; /** * Receives a test class to instantiate and execute. @@ -48,13 +48,13 @@ export class PerfStressProgram { * * @param testClass The testClass to be instantiated. */ - constructor(testClass: PerfStressTestConstructor) { + constructor(testClass: PerfTestConstructor) { this.testName = testClass.name; - this.parsedDefaultOptions = parsePerfStressOption(defaultPerfStressOptions); + this.parsedDefaultOptions = parsePerfOption(defaultPerfOptions); this.parallelNumber = Number(this.parsedDefaultOptions.parallel.value); console.log(`=== Creating ${this.parallelNumber} instance(s) of ${this.testName} ===`); - this.tests = new Array>(this.parallelNumber); + this.tests = new Array>(this.parallelNumber); for (let i = 0; i < this.parallelNumber; i++) { const test = new testClass(); @@ -62,11 +62,11 @@ export class PerfStressProgram { } } - private getCompletedOperations(parallels: PerfStressParallel[]): number { + private getCompletedOperations(parallels: PerfParallel[]): number { return parallels.reduce((sum, i) => sum + i.completedOperations, 0); } - private getOperationsPerSecond(parallels: PerfStressParallel[]): number { + private getOperationsPerSecond(parallels: PerfParallel[]): number { return parallels.reduce((sum, parallel) => { let parallelResult = 0; if (parallel.completedOperations > 0) { @@ -96,7 +96,7 @@ export class PerfStressProgram { * * @param parallels Parallel executions */ - private logResults(parallels: PerfStressParallel[]): void { + private logResults(parallels: PerfParallel[]): void { const totalOperations = this.getCompletedOperations(parallels); const operationsPerSecond = this.getOperationsPerSecond(parallels); const secondsPerOperation = 1 / operationsPerSecond; @@ -123,7 +123,7 @@ export class PerfStressProgram { /** * Runs the test in scope repeatedly, without waiting for any promises to finish, * as many times as possible until durationMilliseconds is reached. - * For each test run, it will report one more completedOperations on the PerfStressParallel given, + * For each test run, it will report one more completedOperations on the PerfParallel given, * as well as the lastMillisecondsElapsed that reports the last test execution's elapsed time in comparison * to the beginning of the execution of runLoop. * @@ -132,8 +132,8 @@ export class PerfStressProgram { * @param abortController Allows us to send through a signal determining when to abort any execution. */ private async runLoopAsync( - test: PerfStressTest, - parallel: PerfStressParallel, + test: PerfTest, + parallel: PerfParallel, durationMilliseconds: number, abortController: AbortController ): Promise { @@ -168,7 +168,7 @@ export class PerfStressProgram { durationSeconds: number, title: string ): Promise { - const parallels: PerfStressParallel[] = new Array(this.parallelNumber); + const parallels: PerfParallel[] = new Array(this.parallelNumber); const parallelTestResults: Array> = new Array>(this.parallelNumber); const abortController = new AbortController(); @@ -201,7 +201,7 @@ export class PerfStressProgram { const runLoop = this.runLoopAsync; - // Unhandled exceptions should stop the whole PerfStress process. + // Unhandled exceptions should stop the whole Perf process. process.on("unhandledRejection", (error) => { throw error; }); @@ -213,7 +213,7 @@ export class PerfStressProgram { // then in another loop, we wait for each one of these promises to finish. // This should allow for the event loop to decide when to process each test call. for (let i = 0; i < parallel; i++) { - const parallel: PerfStressParallel = { + const parallel: PerfParallel = { completedOperations: 0, lastMillisecondsElapsed: 0 }; @@ -253,10 +253,10 @@ export class PerfStressProgram { * until as many seconds as the "warmup" parameter says. This is to adjust * to any possible real-time optimizations that the JavaScript runtime might * do while executing something repeatedly. This is also a requirement to align with the - * PerfStress framework in other languages. + * Perf framework in other languages. * * If any exception is encountered, the whole process will stop, unless - * these exceptions are instances of the class PerfStressTestError, which defines expected errors. + * these exceptions are instances of the class PerfTestError, which defines expected errors. */ public async run(): Promise { // There should be no test execution if the help option is passed. @@ -287,7 +287,7 @@ export class PerfStressProgram { } if (this.tests[0].parsedOptions["test-proxies"].value) { - // Records requests(in runAsync method) for all the instantiated PerfStressTest classes, + // Records requests(in runAsync method) for all the instantiated PerfTest classes, // and asks the proxy-tool to start playing back for future requests. await Promise.all(this.tests.map((test) => this.recordAndStartPlayback(test))); } @@ -349,7 +349,7 @@ export class PerfStressProgram { * - making a request to the proxy server to stop playing back * - delete the live resources that we have created before */ - private async recordAndStartPlayback(test: PerfStressTest) { + private async recordAndStartPlayback(test: PerfTest) { // If test-proxy, // => then start record // => run the runAsync @@ -378,7 +378,7 @@ export class PerfStressProgram { recorder._mode = "playback"; } - private async stopPlayback(test: PerfStressTest) { + private async stopPlayback(test: PerfTest) { if (test.testProxyHttpClient) { await test.testProxyHttpClient.stopPlayback(); } else if (test.testProxyHttpClientV1) { diff --git a/sdk/test-utils/perfstress/src/testProxyHttpClient.ts b/sdk/test-utils/perf/src/testProxyHttpClient.ts similarity index 100% rename from sdk/test-utils/perfstress/src/testProxyHttpClient.ts rename to sdk/test-utils/perf/src/testProxyHttpClient.ts diff --git a/sdk/test-utils/perfstress/src/tests.ts b/sdk/test-utils/perf/src/tests.ts similarity index 75% rename from sdk/test-utils/perfstress/src/tests.ts rename to sdk/test-utils/perf/src/tests.ts index fe5c97ccd11a..5c60f4f254bb 100644 --- a/sdk/test-utils/perfstress/src/tests.ts +++ b/sdk/test-utils/perf/src/tests.ts @@ -4,10 +4,10 @@ import { AbortSignalLike } from "@azure/abort-controller"; import { default as minimist, ParsedArgs as MinimistParsedArgs } from "minimist"; import { - PerfStressOptionDictionary, - parsePerfStressOption, - DefaultPerfStressOptions, - defaultPerfStressOptions + PerfOptionDictionary, + parsePerfOption, + DefaultPerfOptions, + defaultPerfOptions } from "./options"; import { TestProxyHttpClient, @@ -18,33 +18,33 @@ import { HttpClient } from "@azure/core-http"; import { Pipeline } from "@azure/core-rest-pipeline"; /** - * Defines the behavior of the PerfStressTest constructor, to use the class as a value. + * Defines the behavior of the PerfTest constructor, to use the class as a value. */ -export interface PerfStressTestConstructor { - new (): PerfStressTest; +export interface PerfTestConstructor { + new (): PerfTest; } /** - * Conveys the structure of any PerfStress test. + * Conveys the structure of any Perf test. * It allows developers to define the optional parameters to receive * in a way that aids them to auto-complete these options while adding code inside of each method. * It provides methods to parse the assigned options, as well as to set up and tear down any resources - * at a global level (only one setup and teardown for the whole execution of a PerfStress test), + * at a global level (only one setup and teardown for the whole execution of a Perf test), * and at a local level, which happens once for each initialization of the test class * (initializations are as many as the "parallel" command line parameter specifies). */ -export abstract class PerfStressTest { +export abstract class PerfTest { private readonly testProxy!: string; public testProxyHttpClient!: TestProxyHttpClient; public testProxyHttpClientV1!: TestProxyHttpClientV1; - public abstract options: PerfStressOptionDictionary; + public abstract options: PerfOptionDictionary; private static globalParallelIndex: number = 0; protected readonly parallelIndex: number; public constructor() { - this.parallelIndex = PerfStressTest.globalParallelIndex; - PerfStressTest.globalParallelIndex++; + this.parallelIndex = PerfTest.globalParallelIndex; + PerfTest.globalParallelIndex++; const testProxies = this.parsedOptions["test-proxies"].value; if (testProxies) { @@ -53,15 +53,15 @@ export abstract class PerfStressTest { } } - public get parsedOptions(): PerfStressOptionDictionary { + public get parsedOptions(): PerfOptionDictionary { // This cast is needed because TS thinks - // PerfStressOptionDictionary + // PerfOptionDictionary // is different from - // PerfStressOptionDictionary & PerfStressOptionDictionary - return parsePerfStressOption({ + // PerfOptionDictionary & PerfOptionDictionary + return parsePerfOption({ ...this.options, - ...defaultPerfStressOptions - }) as PerfStressOptionDictionary; + ...defaultPerfOptions + }) as PerfOptionDictionary; } // Before and after running a bunch of the same test. @@ -120,12 +120,12 @@ export abstract class PerfStressTest { /** * Picks a specific test case by comparing the first command line paramter to the names of the - * given classes, all of which must extend PerfStressTest. - * @param tests An array of classes that extend PerfStressTest + * given classes, all of which must extend PerfTest. + * @param tests An array of classes that extend PerfTest */ -export function selectPerfStressTest( - tests: PerfStressTestConstructor[] -): PerfStressTestConstructor { +export function selectPerfTest( + tests: PerfTestConstructor[] +): PerfTestConstructor { const testsNames: string[] = tests.map((test) => test.name); const minimistResult: MinimistParsedArgs = minimist(process.argv); const testName = minimistResult._[minimistResult._.length - 1]; diff --git a/sdk/test-utils/perfstress/src/utils.ts b/sdk/test-utils/perf/src/utils.ts similarity index 100% rename from sdk/test-utils/perfstress/src/utils.ts rename to sdk/test-utils/perf/src/utils.ts diff --git a/sdk/test-utils/perfstress/test/delay.spec.ts b/sdk/test-utils/perf/test/delay.spec.ts similarity index 89% rename from sdk/test-utils/perfstress/test/delay.spec.ts rename to sdk/test-utils/perf/test/delay.spec.ts index 5ef8484cea69..a7d1769baec1 100644 --- a/sdk/test-utils/perfstress/test/delay.spec.ts +++ b/sdk/test-utils/perf/test/delay.spec.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest } from "../src"; +import { PerfTest } from "../src"; import { delay } from "@azure/core-http"; /** * Delay500ms waits for 500 milliseconds on every test call, - * which helps track how the PerfStress framework works internally. + * which helps track how the Perf framework works internally. * * Let's say this test is executed with the following parameters: * `--duration 4 --iterations 2`, then this test should be executed twice every 500ms, until 4 seconds are reached. @@ -32,7 +32,7 @@ import { delay } from "@azure/core-http"; * Completed 8 operations in a weighted-average of 4.00s (2.00 ops/s 0.501 s/op) * ``` */ -export class Delay500ms extends PerfStressTest { +export class Delay500ms extends PerfTest { /** * This test doesn't receive command line parameters. */ diff --git a/sdk/test-utils/perfstress/test/exception.spec.ts b/sdk/test-utils/perf/test/exception.spec.ts similarity index 74% rename from sdk/test-utils/perfstress/test/exception.spec.ts rename to sdk/test-utils/perf/test/exception.spec.ts index 38f9351dade9..dccf37cd1566 100644 --- a/sdk/test-utils/perfstress/test/exception.spec.ts +++ b/sdk/test-utils/perf/test/exception.spec.ts @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest } from "../src"; +import { PerfTest } from "../src"; /** - * Exception is designed to test the response speed of the PerfStress test framework + * Exception is designed to test the response speed of the Perf test framework * If the option "sync" is passed, errors will be thrown on every test call, where the test being called is simple function. * Otherwise, errors thrown on every test call, where the test being called is a function returning a promise (an asynchronous function). */ -export class Exception extends PerfStressTest { +export class Exception extends PerfTest { public options = {}; async runAsync(): Promise { diff --git a/sdk/test-utils/perfstress/test/index.spec.ts b/sdk/test-utils/perf/test/index.spec.ts similarity index 66% rename from sdk/test-utils/perfstress/test/index.spec.ts rename to sdk/test-utils/perf/test/index.spec.ts index d9bfd7df2840..8d5f5d331533 100644 --- a/sdk/test-utils/perfstress/test/index.spec.ts +++ b/sdk/test-utils/perf/test/index.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "../src"; +import { PerfProgram, selectPerfTest } from "../src"; // Tests: import { NoOp } from "./noop.spec"; @@ -9,25 +9,25 @@ import { OptionsTest } from "./options.spec"; import { SetupCleanupTest } from "./setupCleanup.spec"; import { Delay500ms } from "./delay.spec"; import { Exception } from "./exception.spec"; -import { PerfStressPolicyTest } from "./perfStressPolicy.spec"; +import { PerfPolicyTest } from "./perfPolicy.spec"; import { SleepTest } from "./sleep.spec"; import { NodeFetchTest } from "./nodeFetch.spec"; import { ServiceClientGetTest } from "./serviceClientGet.spec"; -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram( - selectPerfStressTest([ +const perfProgram = new PerfProgram( + selectPerfTest([ NoOp, OptionsTest, SetupCleanupTest, Delay500ms, Exception, - PerfStressPolicyTest, + PerfPolicyTest, SleepTest, NodeFetchTest, ServiceClientGetTest ]) ); -perfStressProgram.run(); +perfProgram.run(); diff --git a/sdk/test-utils/perfstress/test/nodeFetch.spec.ts b/sdk/test-utils/perf/test/nodeFetch.spec.ts similarity index 77% rename from sdk/test-utils/perfstress/test/nodeFetch.spec.ts rename to sdk/test-utils/perf/test/nodeFetch.spec.ts index 55fd91a57437..26d62cf48017 100644 --- a/sdk/test-utils/perfstress/test/nodeFetch.spec.ts +++ b/sdk/test-utils/perf/test/nodeFetch.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest, PerfStressOptionDictionary } from "../src"; +import { PerfTest, PerfOptionDictionary } from "../src"; import fetch from "node-fetch"; import * as http from "http"; @@ -10,14 +10,14 @@ interface NodeFetchOptions { url: string; } -export class NodeFetchTest extends PerfStressTest { +export class NodeFetchTest extends PerfTest { private static fetchOptions = { agent: new http.Agent({ keepAlive: true }) }; private url: string = ""; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { url: { required: true, description: "Required option", diff --git a/sdk/test-utils/perf/test/noop.spec.ts b/sdk/test-utils/perf/test/noop.spec.ts new file mode 100644 index 000000000000..0fb963ccdb22 --- /dev/null +++ b/sdk/test-utils/perf/test/noop.spec.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PerfTest } from "../src"; + +/** + * Should test the raw performance impact of the Perf framework for both synchronous and asynchronous tests. + */ +export class NoOp extends PerfTest { + public options = {}; + + async runAsync(): Promise {} +} diff --git a/sdk/test-utils/perfstress/test/options.spec.ts b/sdk/test-utils/perf/test/options.spec.ts similarity index 90% rename from sdk/test-utils/perfstress/test/options.spec.ts rename to sdk/test-utils/perf/test/options.spec.ts index 3c8c913d414e..8729283dcb5d 100644 --- a/sdk/test-utils/perfstress/test/options.spec.ts +++ b/sdk/test-utils/perf/test/options.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { default as minimist, ParsedArgs as MinimistParsedArgs } from "minimist"; -import { PerfStressTest, PerfStressOptionDictionary } from "../src"; +import { PerfTest, PerfOptionDictionary } from "../src"; interface OptionsTestOptions { "non-req": string; @@ -14,10 +14,10 @@ interface OptionsTestOptions { } /** - * Showcases and verifies some of the expected behaviors of the PerfStress options + * Showcases and verifies some of the expected behaviors of the Perf options */ -export class OptionsTest extends PerfStressTest { - public options: PerfStressOptionDictionary = { +export class OptionsTest extends PerfTest { + public options: PerfOptionDictionary = { "non-req": { description: "Non-required option" }, diff --git a/sdk/test-utils/perfstress/test/perfStressPolicy.spec.ts b/sdk/test-utils/perf/test/perfPolicy.spec.ts similarity index 81% rename from sdk/test-utils/perfstress/test/perfStressPolicy.spec.ts rename to sdk/test-utils/perf/test/perfPolicy.spec.ts index 7b26c254d096..f023f988f092 100644 --- a/sdk/test-utils/perfstress/test/perfStressPolicy.spec.ts +++ b/sdk/test-utils/perf/test/perfPolicy.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import * as url from "url"; -import { PerfStressTest, PerfStressOptionDictionary, PerfStressPolicy } from "../src"; +import { PerfTest, PerfOptionDictionary, PerfPolicy } from "../src"; import { WebResource, HttpOperationResponse, @@ -10,7 +10,7 @@ import { RequestPolicyOptions } from "@azure/core-http"; -interface PerfStressPolicyOptions { +interface PerfPolicyOptions { url: string; } @@ -21,11 +21,11 @@ const defaultResponse = { }; /** - * Tests the behavior of the PerfStressPolicy. + * Tests the behavior of the PerfPolicy. * Similar to the tests available in the core-http package of the default policies provided. */ -export class PerfStressPolicyTest extends PerfStressTest { - public options: PerfStressOptionDictionary = { +export class PerfPolicyTest extends PerfTest { + public options: PerfOptionDictionary = { url: { required: true, description: "URL that will replace any request's original targeted URL", @@ -58,7 +58,7 @@ export class PerfStressPolicyTest extends PerfStressTest { +export class ServiceClientGetTest extends PerfTest { client: ServiceClient; request: PipelineRequest; firstRun: boolean = true; - public options: PerfStressOptionDictionary = { + public options: PerfOptionDictionary = { "first-run-extra-requests": { description: "Extra requests to send on first run. " + diff --git a/sdk/test-utils/perfstress/test/setupCleanup.spec.ts b/sdk/test-utils/perf/test/setupCleanup.spec.ts similarity index 84% rename from sdk/test-utils/perfstress/test/setupCleanup.spec.ts rename to sdk/test-utils/perf/test/setupCleanup.spec.ts index c404cd3082a6..1c5949cbba01 100644 --- a/sdk/test-utils/perfstress/test/setupCleanup.spec.ts +++ b/sdk/test-utils/perf/test/setupCleanup.spec.ts @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest, PerfStressOptionDictionary } from "../src"; +import { PerfTest, PerfOptionDictionary } from "../src"; /** * Showcases and verifies some of the expected behaviors of the setup, globalSetup, cleanup and globalCleanup methods - * of the PerfStressTest class. + * of the PerfTest class. */ -export class SetupCleanupTest extends PerfStressTest { - public options: PerfStressOptionDictionary = {}; +export class SetupCleanupTest extends PerfTest { + public options: PerfOptionDictionary = {}; public state = { globalSetup: 0, diff --git a/sdk/test-utils/perfstress/test/sleep.spec.ts b/sdk/test-utils/perf/test/sleep.spec.ts similarity index 90% rename from sdk/test-utils/perfstress/test/sleep.spec.ts rename to sdk/test-utils/perf/test/sleep.spec.ts index 042a1a373799..b9cf02cadb94 100644 --- a/sdk/test-utils/perfstress/test/sleep.spec.ts +++ b/sdk/test-utils/perf/test/sleep.spec.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressTest } from "../src"; +import { PerfTest } from "../src"; import { delay } from "@azure/core-http"; // Used for verifying the perf framework correctly computes average throughput across parallel tests of different speed -export class SleepTest extends PerfStressTest { +export class SleepTest extends PerfTest { private static instanceCount: number = 0; private secondsPerOperation: number = 0; diff --git a/sdk/test-utils/perfstress/tsconfig.json b/sdk/test-utils/perf/tsconfig.json similarity index 100% rename from sdk/test-utils/perfstress/tsconfig.json rename to sdk/test-utils/perf/tsconfig.json diff --git a/sdk/test-utils/perfstress/build.ps1 b/sdk/test-utils/perfstress/build.ps1 deleted file mode 100644 index 4ff59bf4cb0d..000000000000 --- a/sdk/test-utils/perfstress/build.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -docker build -t azure-sdk-for-js-perfstress -f Dockerfile ../../../ diff --git a/sdk/test-utils/perfstress/run.ps1 b/sdk/test-utils/perfstress/run.ps1 deleted file mode 100644 index b44d93a97eec..000000000000 --- a/sdk/test-utils/perfstress/run.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env pwsh - -docker run -it --rm --network host system-perfstress-net @args diff --git a/sdk/test-utils/perfstress/test/noop.spec.ts b/sdk/test-utils/perfstress/test/noop.spec.ts deleted file mode 100644 index a3f525094c79..000000000000 --- a/sdk/test-utils/perfstress/test/noop.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { PerfStressTest } from "../src"; - -/** - * Should test the raw performance impact of the PerfStress framework for both synchronous and asynchronous tests. - */ -export class NoOp extends PerfStressTest { - public options = {}; - - async runAsync(): Promise {} -} diff --git a/sdk/textanalytics/perf-tests/text-analytics/package.json b/sdk/textanalytics/perf-tests/text-analytics/package.json index 874bed07a4e2..d2ea70e9386a 100644 --- a/sdk/textanalytics/perf-tests/text-analytics/package.json +++ b/sdk/textanalytics/perf-tests/text-analytics/package.json @@ -10,7 +10,7 @@ "dependencies": { "@azure/ai-text-analytics": "^5.1.0-beta.5", "@azure/identity": "2.0.0-beta.6", - "@azure/test-utils-perfstress": "^1.0.0", + "@azure/test-utils-perf": "^1.0.0", "dotenv": "^8.2.0" }, "devDependencies": { diff --git a/sdk/textanalytics/perf-tests/text-analytics/test/detectLanguage.spec.ts b/sdk/textanalytics/perf-tests/text-analytics/test/detectLanguage.spec.ts index 94f5c917dc8c..e8cd7f484481 100644 --- a/sdk/textanalytics/perf-tests/text-analytics/test/detectLanguage.spec.ts +++ b/sdk/textanalytics/perf-tests/text-analytics/test/detectLanguage.spec.ts @@ -2,10 +2,10 @@ // Licensed under the MIT license. import { - PerfStressTest, - PerfStressOptionDictionary, + PerfTest, + PerfOptionDictionary, getEnvVar -} from "@azure/test-utils-perfstress"; +} from "@azure/test-utils-perf"; import { AzureKeyCredential, TextAnalyticsClient, @@ -17,8 +17,8 @@ interface DetectLanguagePerfTestOptions extends DetectLanguageOptions { "documents-count": number; } -export class DetectLanguageTest extends PerfStressTest { - options: PerfStressOptionDictionary = { +export class DetectLanguageTest extends PerfTest { + options: PerfOptionDictionary = { "documents-count": { required: true, description: "Number of documents", diff --git a/sdk/textanalytics/perf-tests/text-analytics/test/index.spec.ts b/sdk/textanalytics/perf-tests/text-analytics/test/index.spec.ts index f6340de26cc2..216fb0bbd7dd 100644 --- a/sdk/textanalytics/perf-tests/text-analytics/test/index.spec.ts +++ b/sdk/textanalytics/perf-tests/text-analytics/test/index.spec.ts @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PerfStressProgram, selectPerfStressTest } from "@azure/test-utils-perfstress"; +import { PerfProgram, selectPerfTest } from "@azure/test-utils-perf"; import { DetectLanguageTest } from "./detectLanguage.spec"; import dotenv from "dotenv"; dotenv.config(); -console.log("=== Starting the perfStress test ==="); +console.log("=== Starting the perf test ==="); -const perfStressProgram = new PerfStressProgram(selectPerfStressTest([DetectLanguageTest])); +const perfProgram = new PerfProgram(selectPerfTest([DetectLanguageTest])); -perfStressProgram.run(); +perfProgram.run();