-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
89 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
from locust import HttpUser, task, between | ||
|
||
class SpotifyMicroserviceUser(HttpUser): | ||
wait_time = between(1, 2) | ||
from locust import HttpUser, TaskSet, task | ||
|
||
class UserBehavior(TaskSet): | ||
@task | ||
def test_filters(self): | ||
self.client.get("/filters", timeout=30) | ||
def filters(self): | ||
self.client.get("/filters", timeout=120) # Set a 120-second timeout | ||
|
||
@task | ||
def test_tracks(self): | ||
self.client.get("/tracks?date=2021-01-01®ion=United States&artist=Shakira&limit=20&offset=0", timeout=30) | ||
def tracks(self): | ||
self.client.get("/tracks?date=2021-01-01®ion=United%20States&artist=Shakira", timeout=120) | ||
|
||
|
||
class WebsiteUser(HttpUser): | ||
tasks = [UserBehavior] | ||
host = "http://127.0.0.1:3000" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Empty file.