Skip to content

Commit 0cb1770

Browse files
authored
[Perf] Rename perfstress-test to perf-test (Azure#14073)
- Also delete obsolete command in storage-blob
1 parent 2d64abe commit 0cb1770

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

sdk/storage/storage-blob/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix",
5555
"lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o storage-blob-lintReport.html || exit 0",
5656
"pack": "npm pack 2>&1",
57-
"perfstress-test:node": "cross-env TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\": \\\"commonjs\\\"}\" ts-node test/perfstress/track-2/index.spec.ts",
5857
"prebuild": "npm run clean",
5958
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
6059
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",

sdk/test-utils/perfstress/README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import { PerfStressTest } from "@azure/test-utils-perfstress";
2020
export class MyTest extends PerfStressTest<string> {
2121
public options = {};
2222

23-
async runAsync(): Promise<void> {
24-
}
23+
async runAsync(): Promise<void> {}
2524
}
2625
```
2726

@@ -40,25 +39,21 @@ import { MyTest } from "./myTest.spec";
4039

4140
console.log("=== Starting a PerfStress test for MyClient ===");
4241

43-
const perfStressProgram = new PerfStressProgram(
44-
selectPerfStressTest([
45-
MyTest,
46-
])
47-
);
42+
const perfStressProgram = new PerfStressProgram(selectPerfStressTest([MyTest]));
4843

4944
perfStressProgram.run();
5045
```
5146

5247
Add the following script to the list of scripts in your `package.json`:
5348

5449
```json
55-
"perfstress-test:node": "rushx build && node dist-esm/test/index.spec.js",
50+
"perf-test:node": "rushx build && node dist-esm/test/index.spec.js",
5651
```
5752

5853
Now you'll be able to call your new PerfStress test as follows:
5954

6055
```
61-
npm run perfstress-test:node -- MyTest --warmup 2 --duration 4 --iterations 2
56+
npm run perf-test:node -- MyTest --warmup 2 --duration 4 --iterations 2
6257
```
6358

6459
## KeyConcepts

sdk/test-utils/perfstress/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"lint": "eslint package.json src test --ext .ts -f html -o perfstress-lintReport.html || exit 0",
2626
"pack": "npm pack 2>&1",
2727
"prebuild": "npm run clean",
28-
"perfstress-test:node": "npm run build && node dist-esm/test/index.spec.js",
28+
"perf-test:node": "npm run build && node dist-esm/test/index.spec.js",
2929
"unit-test:browser": "echo skipped",
3030
"unit-test:node": "echo skipped",
3131
"unit-test": "npm run unit-test:node && npm run unit-test:browser",

sdk/test-utils/perfstress/runAllTests.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
rushx clean
44
rushx build
55

6-
npm run perfstress-test:node -- NoOp --warmup 2 --duration 4 --iterations 2
7-
npm run perfstress-test:node -- NoOp --warmup 2 --duration 4 --iterations 2 --sync
8-
npm run perfstress-test:node -- OptionsTest --warmup 2 --duration 4 --iterations 2 --sync
9-
npm run perfstress-test:node -- SetupCleanupTest --warmup 2 --duration 4 --iterations 2 --sync
10-
npm run perfstress-test:node -- Delay500ms --warmup 2 --duration 4 --iterations 2
11-
npm run perfstress-test:node -- Exception --warmup 2 --duration 4 --iterations 2
12-
npm run perfstress-test:node -- Exception --warmup 2 --duration 4 --iterations 2 --sync
13-
npm run perfstress-test:node -- PerfStressPolicyTest --warmup 2 --duration 4 --iterations 2 --url http://my-host.com/
6+
npm run perf-test:node -- NoOp --warmup 2 --duration 4 --iterations 2
7+
npm run perf-test:node -- NoOp --warmup 2 --duration 4 --iterations 2 --sync
8+
npm run perf-test:node -- OptionsTest --warmup 2 --duration 4 --iterations 2 --sync
9+
npm run perf-test:node -- SetupCleanupTest --warmup 2 --duration 4 --iterations 2 --sync
10+
npm run perf-test:node -- Delay500ms --warmup 2 --duration 4 --iterations 2
11+
npm run perf-test:node -- Exception --warmup 2 --duration 4 --iterations 2
12+
npm run perf-test:node -- Exception --warmup 2 --duration 4 --iterations 2 --sync
13+
npm run perf-test:node -- PerfStressPolicyTest --warmup 2 --duration 4 --iterations 2 --url http://my-host.com/

0 commit comments

Comments
 (0)