North-Seattle-College / ad440-winter2021-thursday-repo

NSC AD 440 Winter 2021 Thursday cohort practicum repo
Apache License 2.0
2 stars 27 forks source link

[Task] Using Serverless Artillery 40 requests with cache /users/{userId} #289

Open jak-ashuraliev opened 3 years ago

jak-ashuraliev commented 3 years ago

Serverless Artillery 40 requests with cache /users/{userId} with CACHE.

Run Test:

Open your terminal and cd into the root directory of the project. Follow the below steps:

export AWS_ACCESS_KEY_ID=<>
export AWS_SECRET_ACCESS_KEY=<>
npm install -g serverless@1.38.0
npm install -g serverless-artillery

In order to create a script file, run the following command:

slsart script -e {URL of endpoint to hit with requests} -d 300 -r 40

To Deploy, run this command:

slsart deploy --stage <stack name> --region <region>

To Invoke, run this command:

slsart invoke -p script.yml --stage <stack name> --region  <region>

To Remove Stack on AWS, run this command:

slsart remove --stage <stack name> --region  <region>

Test Results

Can be obtained by loggin into AWS -> Lambda -> Name of your function ->Monitor -> Logs . . .
Summary report @ 05:13:43(+0000) 2021-03-25
Scenarios launched: 900
Scenarios completed: 900
Requests completed: 900
PRS Sent: 14.92
Request latency:
. min 29.1
. max 115.3
. median 30.7
. p95 41
. p99 66.7
Scenario Counts:
0: 900 (100%)
Codes:
. 200: 900

Time Spent

DATE ACTIVITY TIME
3/21 Research 2hr
3/22 Test 2hr
-- Total Hours 4hr