summaryrefslogtreecommitdiff
path: root/benchmarks/py-locust/files/extra-EXAMPLES-semaphore_wait.py
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/py-locust/files/extra-EXAMPLES-semaphore_wait.py')
-rw-r--r--benchmarks/py-locust/files/extra-EXAMPLES-semaphore_wait.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/benchmarks/py-locust/files/extra-EXAMPLES-semaphore_wait.py b/benchmarks/py-locust/files/extra-EXAMPLES-semaphore_wait.py
deleted file mode 100644
index 563b89c95d63..000000000000
--- a/benchmarks/py-locust/files/extra-EXAMPLES-semaphore_wait.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from locust import HttpLocust, TaskSet, task, events
-
-from gevent.coros import Semaphore
-all_locusts_spawned = Semaphore()
-all_locusts_spawned.acquire()
-
-def on_hatch_complete(**kw):
- all_locusts_spawned.release()
-
-events.hatch_complete += on_hatch_complete
-
-class UserTasks(TaskSet):
- def on_start(self):
- all_locusts_spawned.wait()
- self.wait()
-
- @task
- def index(self):
- self.client.get("/")
-
-class WebsiteUser(HttpLocust):
- host = "http://127.0.0.1:8089"
- min_wait = 2000
- max_wait = 5000
- task_set = UserTasks