Loading testing for Hydra
npm install @evdy-consumer/hydra-load-testingma-load-testing> This package is for migraine again load testing
* Get a representative sample of urls based on total pages per template / total pages
```
node bin/hydra-load-testing.js load-urls -r -s 200 -o ./urls.js
The -r option enables getting a representative sample
The -s option specifies the size of the total sample, aka how many urls to get back. You may get a few more pages because the script takes the ceiling of the fraction * total nbr pages
The -o option specifies the file path to write the urls to
* Choose how many pages of each type to get
``
node bin/hydra-load-testing.js load-urls -t article -t author -n 80 -n 10 -o ./urls.js
The -t option specifies the template
The -n option specifies the number of pages to get for that template
If you specify -t params, you will only get pages for those templates that you specify
The -n value corresponds to the -t template at the same index
* For more options see help
``
node bin/hydra-load-testing.js load-urls --help
#### Ouputting to a json file
``
k6 run runner.js -e HOST=https://pre.migraineagain.com -e VUS=100 -e SITE="Migraine Again" --out json=output/100.json
#### Outputting to cloud
* First make sure you have the K6_CLOUD_TOKEN environment variable set. Reach out to Ali if you need it
* Then run the following
``
k6 run runner.js -e HOST=https://pre.migraineagain.com -e VUS=200 -e SITE="Migraine Again" -e K6_CLOUD_TOKEN=$K6_CLOUD_TOKEN --out cloud
To evaluate results, follow the guidelines provided in the "Expected Range values for K6" section here
The requests/second value described there corresponds to the http_reqs` value in the k6 output