-
Notifications
You must be signed in to change notification settings - Fork 0
[gh-64] Added stress test script #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
stress_test.py
Outdated
import json | ||
|
||
|
||
BASE_HOST = "http://localhost:8000/edrop/" # Replace with endpoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's get this from the command line
stress_test.py
Outdated
BASE_URL = f"{BASE_HOST}api/order/create" | ||
|
||
REQUESTS_PER_SECOND = 20 | ||
TOTAL_DURATION = 60 # Duration in seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two as well
stress_test.py
Outdated
|
||
# Test payload for the API requests | ||
TEST_PAYLOAD = { | ||
'instrument': 'consent', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be "contact"
stress_test.py
Outdated
# Test payload for the API requests | ||
TEST_PAYLOAD = { | ||
'instrument': 'consent', | ||
'record': '999999', # this is a test record id hence it will not exist in the database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we actually want this to vary, otherwise it'll just bounce right back after the first request, which creates the record.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words, each request should go through the motions of creating an order and sending it to GBF.
Stress Test Script | ||
|
||
This script performs load testing on the eDrop API endpoint by sending concurrent requests | ||
at a specified rate for a specified duration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a warning here that this should be run when mocking REDCap as well as GBF.
… instead of generic 99999, added warning for script
No description provided.