File tree Expand file tree Collapse file tree 4 files changed +13
-19
lines changed Expand file tree Collapse file tree 4 files changed +13
-19
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change @@ -20,8 +20,7 @@ import { PerfStressTest } from "@azure/test-utils-perfstress";
2020export 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
4140console .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
4944perfStressProgram .run ();
5045```
5146
5247Add 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
5853Now 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
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 33rushx clean
44rushx 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/
You can’t perform that action at this time.
0 commit comments