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

how to make all locust users wait after executing on_start method ? #611

Closed
naga-sagar opened this issue Jun 26, 2017 · 4 comments
Closed

Comments

@naga-sagar
Copy link

Hi,

I have a use case where login will happen slowly (i.e. on_start will have login function) and hatchrate will be at 2000 but no of users simulated will be close to 70,000.

After login, I need all the users to wait and hit the next api call at exact same time so that the load will be at 70,000. How do i achieve it ?

Thanks
Sagar

@aldenpeterson-wf
Copy link
Contributor

It sounds like you want to use a normal python script and not use Locust since you aren't really doing the type of load testing that Locust was designed for.

@naga-sagar
Copy link
Author

Thanks for your prompt reply.

Let me explain my scenario in detail. There is an application where users login initially and since this login service can't handle too many request at once, we do slow ramp by giving the hatch rate. Once the ramp up is done, we want to bombard with many requests at once.

here is the sample code we are using:
class DesktopTaskSet(TaskSet):
tasks = {task1: 10}
def on_start(self):
self.client.get(master_url)
class PerfTest(HttpLocust):
task_set = DesktopTaskSet

once i start locust, i give users as 70000 with hatch rate of 2000. Here we wanted the all the users(70000) to complete on_start (at hatch rate of 2000) to be completed and later the task1 should get all the requests(70000 task1) at once. Please let me know how it be achieved. Once again, thanks for your help.

Thanks
Sagar

@daluu
Copy link

daluu commented Jul 24, 2017

I came across this thread earlier researching locust, this comment on use of semaphores might be what you need: #59 (comment)

@cyberw
Copy link
Collaborator

cyberw commented Oct 18, 2019

Closing this due to lack of activity. I hope you solved your issue, otherwise try slack!

@cyberw cyberw closed this as completed Oct 18, 2019
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

No branches or pull requests

4 participants