Просмотр исходного кода

chore: Add link to load test doc, increase order limit for load tests

Michael Bromley 6 лет назад
Родитель
Сommit
e3c9bb6752

+ 3 - 2
packages/dev-server/.gitignore

@@ -4,7 +4,8 @@ test-emails
 vendure.sqlite
 vendure-import-error.log
 load-testing/data-sources/products*.csv
-load-testing/results/*.json
-load-testing/results/*.csv
+load-testing/results/**/*.json
+load-testing/results/**/*.csv
 load-testing/static/assets
 dev-config-override.ts
+vendure.log

+ 3 - 3
packages/dev-server/README.md

@@ -43,14 +43,14 @@ The npm scripts `load-test:1k`, `load-test:10k` and `load-test:100k` will popula
 An individual test script may be by specifying the script name as an argument:
 
 ```
-yarn ts-node load-testing/run-load-test.ts 1000 deep-query.js
+yarn load-test:1k deep-query.js
 ```
 
 ### Results
 
 The results of the test are saved to the [`./load-testing/results`](./load-testing/results) directory. Each test run creates two files:
 
-* `load-test-<date>-<product-count>-<script-name>.json` Contains a summary of the test
+* `load-test-<date>-<product-count>.json` Contains a summary of all load tests run
 * `load-test-<date>-<product-count>-<script-name>.csv` Contains time-series data which can be used to create charts
 
-
+Historical benchmark results with charts can be found in [this Google Sheet](https://docs.google.com/spreadsheets/d/1UaNhmokbNmKDehrnh4m9XO6-DJte-AI-l_Lnji47Qn8/edit?usp=sharing)

+ 3 - 0
packages/dev-server/load-testing/load-test-config.ts

@@ -28,6 +28,9 @@ export function getLoadTestConfig(tokenMethod: 'cookie' | 'bearer'): Required<Ve
         paymentOptions: {
             paymentMethodHandlers: [examplePaymentHandler],
         },
+        orderOptions: {
+            orderItemsLimit: 99999,
+        },
         logger: new DefaultLogger({ level: LogLevel.Info }),
         dbConnectionOptions: getMysqlConnectionOptions(count),
         authOptions: {