Skip to content
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

just do 5000 sized bulk sends in test #2424

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions scripts/load_test/load_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


class NotifyApiUser(HttpUser):
wait_time = constant_pacing(1) # do something every second
wait_time = constant_pacing(30) # do something every second

def __init__(self, *args, **kwargs):
super(NotifyApiUser, self).__init__(*args, **kwargs)
Expand Down Expand Up @@ -55,36 +55,36 @@

# SMS Tasks

@task(120) # about every 5 seconds
def send_high_priority_sms(self):
json = {"phone_number": self.phone_number, "template_id": self.high_priority_sms_template}
self.client.post("/v2/notifications/sms", json=json, headers=self.headers)
# @task(120) # about every 5 seconds
# def send_high_priority_sms(self):
# json = {"phone_number": self.phone_number, "template_id": self.high_priority_sms_template}
# self.client.post("/v2/notifications/sms", json=json, headers=self.headers)
Comment on lines +59 to +61

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

@task(2) # about every 5 minutes
def send_medium_priority_sms(self):
self.send_bulk_sms(self.medium_priority_sms_template, 199)
# @task(2) # about every 5 minutes
# def send_medium_priority_sms(self):
# self.send_bulk_sms(self.medium_priority_sms_template, 199)
Comment on lines +64 to +65

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

@task(1) # about every 10 minutes
def send_low_priority_sms(self):
self.send_bulk_sms(self.low_priority_sms_template, 1000)
# @task(1) # about every 10 minutes
# def send_low_priority_sms(self):
# self.send_bulk_sms(self.low_priority_sms_template, 1000)

# Email Tasks
# # Email Tasks
Comment on lines +68 to +71

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

@task(120) # about every 5 seconds
def send_high_priority_email(self):
json = {"email_address": self.email_address, "template_id": self.high_priority_email_template}
self.client.post("/v2/notifications/email", json=json, headers=self.headers)
# @task(120) # about every 5 seconds
# def send_high_priority_email(self):
# json = {"email_address": self.email_address, "template_id": self.high_priority_email_template}
# self.client.post("/v2/notifications/email", json=json, headers=self.headers)
Comment on lines +74 to +76

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

@task(2) # about every 5 minutes
def send_medium_priority_email(self):
self.send_bulk_email(self.medium_priority_email_template, 199)
# @task(2) # about every 5 minutes
# def send_medium_priority_email(self):
# self.send_bulk_email(self.medium_priority_email_template, 199)
Comment on lines +79 to +80

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

@task(1) # about every 10 minutes
def send_low_priority_emails(self):
self.send_bulk_email(self.low_priority_email_template, 10000)
self.send_bulk_email(self.low_priority_email_template, 5000)

# Do nothing task

@task(600 - 120 - 2 - 1 - 120 - 2 - 1)
def do_nothing(self):
pass
# @task(600 - 120 - 2 - 1 - 120 - 2 - 1)
# def do_nothing(self):
# pass
Comment on lines +89 to +90

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Loading