Skip to content

Conversation

Girik1105
Copy link
Collaborator

No description provided.

stress_test.py Outdated
import json


BASE_HOST = "http://localhost:8000/edrop/" # Replace with endpoint
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two as well

@jdamerow jdamerow closed this Feb 20, 2025
@Girik1105 Girik1105 reopened this Feb 20, 2025
stress_test.py Outdated

# Test payload for the API requests
TEST_PAYLOAD = {
'instrument': 'consent',
Copy link
Member

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
Copy link
Member

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.

Copy link
Member

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.
Copy link
Member

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.

@jdamerow jdamerow closed this Feb 26, 2025
@Girik1105 Girik1105 reopened this Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants