Skip to content

Commit

Permalink
[Perf Framework] rename PerfStress to Perf (Azure#18033)
Browse files Browse the repository at this point in the history
  • Loading branch information
timovv committed Oct 19, 2021
1 parent 48ebdfb commit a97c7b8
Show file tree
Hide file tree
Showing 165 changed files with 464 additions and 464 deletions.
10 changes: 5 additions & 5 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions common/tools/perf-tests-track-1-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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`);
4 changes: 2 additions & 2 deletions dataplane.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion eng/tools/rush-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
],
Expand Down
6 changes: 3 additions & 3 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
{
Expand Down Expand Up @@ -982,4 +982,4 @@
"versionPolicyName": "management"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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<TOptions> extends PerfStressTest<TOptions> {
export abstract class AppConfigTest<TOptions> extends PerfTest<TOptions> {
client: AppConfigurationClient;

constructor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -14,7 +14,7 @@ interface ListTestOptions {

export class ListSettingsTest extends AppConfigTest<ListTestOptions> {
static prefix = generateUuid();
public options: PerfStressOptionDictionary<ListTestOptions> = {
public options: PerfOptionDictionary<ListTestOptions> = {
count: {
required: true,
description: "Number of settings to be listed",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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<TOptions> extends PerfStressTest<TOptions> {
export abstract class ContainerRegistryTest<TOptions> extends PerfTest<TOptions> {
client: ContainerRegistryClient;

constructor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
Original file line number Diff line number Diff line change
@@ -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<ContainerRegistryTestOptions> {
repository: ContainerRepository;
public options: PerfStressOptionDictionary<ContainerRegistryTestOptions> = {};
public options: PerfOptionDictionary<ContainerRegistryTestOptions> = {};
constructor() {
super();
this.repository = this.client.getRepository(getEnvVar("REPOSITORY_NAME"));
Expand Down
Original file line number Diff line number Diff line change
@@ -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<ContainerRegistryTestOptions> {
public options: PerfStressOptionDictionary<ContainerRegistryTestOptions> = {};
public options: PerfOptionDictionary<ContainerRegistryTestOptions> = {};
constructor() {
super();
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/perf-tests/core-rest-pipeline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -116,7 +116,7 @@ class MockRefreshAzureCredential implements TokenCredential {
}
}

export class BearerTokenAuthenticationPolicyChallengeTest extends PerfStressTest {
export class BearerTokenAuthenticationPolicyChallengeTest extends PerfTest {
options = {};

constructor() {
Expand Down
10 changes: 5 additions & 5 deletions sdk/core/perf-tests/core-rest-pipeline/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -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();
2 changes: 1 addition & 1 deletion sdk/eventgrid/perf-tests/eventgrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
8 changes: 4 additions & 4 deletions sdk/eventgrid/perf-tests/eventgrid/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -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();
10 changes: 5 additions & 5 deletions sdk/eventgrid/perf-tests/eventgrid/test/sendCloudEvents.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -16,8 +16,8 @@ interface SendCloudEventsPerfTestOptions {
"event-count": number;
}

export class SendCloudEventsTest extends PerfStressTest<SendCloudEventsPerfTestOptions> {
options: PerfStressOptionDictionary<SendCloudEventsPerfTestOptions> = {
export class SendCloudEventsTest extends PerfTest<SendCloudEventsPerfTestOptions> {
options: PerfOptionDictionary<SendCloudEventsPerfTestOptions> = {
"event-count": {
required: true,
description: "Number of events to send in a single request",
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhub/event-hubs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhub/perf-tests/event-hubs-track-1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhub/perf-tests/event-hubs-track-1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
8 changes: 4 additions & 4 deletions sdk/eventhub/perf-tests/event-hubs-track-1/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -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();
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
10 changes: 5 additions & 5 deletions sdk/eventhub/perf-tests/event-hubs-track-1/test/send.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -20,10 +20,10 @@ interface SendTestOptions {
}

const client = EventHubClient.createFromConnectionString(connectionString, eventHubName);
export class SendTest extends PerfStressTest<SendTestOptions> {
export class SendTest extends PerfTest<SendTestOptions> {
producer: EventHubClient;
eventBatch: EventData[];
public options: PerfStressOptionDictionary<SendTestOptions> = {
public options: PerfOptionDictionary<SendTestOptions> = {
eventBodySize: {
required: true,
description: "Size in bytes",
Expand Down
Loading

0 comments on commit a97c7b8

Please sign in to comment.