Is your feature request related to a problem? Please describe.
We are testing the API endpoint for user/userId with Serverless Artillery at 40 hits per second for 5 minutes, while having the CACHE toggle Off to compare the latency and other performance measures to the endpoint performance while having the CACHE toggle On
Describe the solution you'd like
To achieve the objective, will run the test in CLI and document the results of the test, then compare
Describe alternatives you've considered
Not applicable
Additional context
Date
Activity
Time Spent
03/20/2021
Research Task and Slsart Documentation
1 hours
03/23/2021
Set up the environment, run the test
2 hours
3/23/2021
Meeting with classmates, discussions, troubleshooting
3 hours
03/24/2021
Documentation
1 hour
Total
7 hours
STEPS AND RESOLUTION
Install serverless artillery on the local machine in accordance with the documentation (requires prior installation of npm
Save the script.yml document with specifications to your working folder:
#Serverless Artillery Test for /users/{user_id} with 40 requests per second for 5 minutes
config:
target: "https://nsc-thursday-react-app.azureedge.net/users/3"
phases:
- duration: 300
arrivalRate: 40
name: "users/user_id test"
scenarios:
- flow:
- get:
url: "/api/users/3"
json:
as: "users.userid"
Deploy the slsart function on AWS so that it can run the test on the specified target
slsart deploy --stage <yourName> --region us-west-2
Invoke the slsart function on AWS so that it can run the test on the specified target
slsart invoke --stage <yourName --region us-west-2
Note: -m may be added to the invoke command to run a truncated version of the test, limited to 5 scenarios, like so:
slsart invoke -m --stage <yourName> --region us-west-2Note: for test requests that run over one minute, the results may not display in the terminal/cli window, but will be available after the test run is complete on the AWS site, in CloudWatch logs (search by the stage name)
Conclusion:
After comparison of the results with Cache turned on and off, we did not find significant differences. Further review of the endpoint code showed that the Cache On/Off functionality was not fully implemented for the endpoint.
Is your feature request related to a problem? Please describe. We are testing the API endpoint for user/userId with Serverless Artillery at 40 hits per second for 5 minutes, while having the CACHE toggle Off to compare the latency and other performance measures to the endpoint performance while having the CACHE toggle On
Describe the solution you'd like To achieve the objective, will run the test in CLI and document the results of the test, then compare
Describe alternatives you've considered Not applicable
Additional context
STEPS AND RESOLUTION
slsart deploy --stage <yourName> --region us-west-2
slsart invoke --stage <yourName --region us-west-2
Note:
-m
may be added to the invoke command to run a truncated version of the test, limited to 5 scenarios, like so:slsart invoke -m --stage <yourName> --region us-west-2
Note: for test requests that run over one minute, the results may not display in the terminal/cli window, but will be available after the test run is complete on the AWS site, in CloudWatch logs (search by the stage name)Results: -m test results: Invoking test Lambda
Extended test results:
slsart remove --stage <yourName> --region us-west-2
command