Skip to content

Commit

Permalink
remove two versions that don't have a git branch, update docker-compo…
Browse files Browse the repository at this point in the history
…se config and locustfile to comply with versions <=1.14.5
  • Loading branch information
mrMosi committed Feb 27, 2025
1 parent a667803 commit 0513ffe
Show file tree
Hide file tree
Showing 6 changed files with 2,166 additions and 1,328 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ services:
image: "locustio/locust:${LC_VERSION}"
ports:
- "8089:8089"
# entrypoint is needed only for versions <=1.14.5
entrypoint: [ "locust" ]
volumes:
- ./locustfile.py:/mnt/locust/locustfile.py
command: -f /mnt/locust/locustfile.py --master -H http://master:8089
healthcheck:
test: [ "CMD", "python3", "-c", "import socket; socket.create_connection(('localhost', 8089), timeout=1)" ]
interval: 3s
retries: 10
retries: 10
# environments are needed for versions <=1.14.5
environment:
TARGET_URL: http://locust-master:8089
LOCUSTFILE_PATH: /mnt/locust/locustfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,28 @@
from locust import HttpLocust as HttpUser, TaskSet, task


def index(l):
l.client.get("/")


def stats(l):
l.client.get("/stats/requests")


class UserTasks(TaskSet):
# one can specify tasks like this
tasks = [index, stats]

# but it might be convenient to use the @task decorator
@task
def hello_world(self):
def page404(self):
self.client.get("/does_not_exist")
self.client.get("/hello")
self.client.get("/world")


class HelloWorldUser(HttpUser):
host = "http://127.0.0.1:8089"
tasks = [UserTasks]
# version <= 1.14.5
task_set = UserTasks

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ for LC_VERSION in "${ALL_VERSIONS[@]}"; do
checkOutRepo "${GIT_REPO}" "${LC_VERSION}"

updateFingerprint \
"locust" \
"Locust" \
"${LC_VERSION}" \
"${FINGERPRINTS_PATH}" \
"${GIT_REPO}" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
2.31.2
2.31.1
2.31.0
2.30.1
2.29.1
2.29.0
2.28.0
Expand All @@ -32,7 +31,6 @@
2.23.0
2.22.0
2.21.0
2.20.2
2.20.1
2.20.0
2.19.1
Expand Down
Loading

0 comments on commit 0513ffe

Please sign in to comment.