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

Fix/on start run one time #530

Closed
wants to merge 4 commits into from

Conversation

gunesmes
Copy link

@gunesmes gunesmes commented Feb 6, 2017

fix for: #529

Printing ON_START running inside on_start before fix:
`
~/P/m/p/responsive_gecis (master↑) locust -f all_links.py --host=http://test.com --clients=5 --hatch-rate=1 --num-request=25 --no-web --only-summary
[2017-02-06 18:15:16,959] Mesuts-MacBook.local/INFO/locust.main: Starting Locust 0.7.5
[2017-02-06 18:15:16,959] Mesuts-MacBook.local/INFO/locust.runners: Hatching and swarming 5 clients at the rate 1 clients/s...
[2017-02-06 18:15:16,959] Mesuts-MacBook.local/INFO/stdout: ON_START running
[2017-02-06 18:15:16,960] Mesuts-MacBook.local/INFO/stdout:
[2017-02-06 18:15:17,959] Mesuts-MacBook.local/INFO/stdout: ON_START running
[2017-02-06 18:15:17,960] Mesuts-MacBook.local/INFO/stdout:
[2017-02-06 18:15:18,962] Mesuts-MacBook.local/INFO/stdout: ON_START running
[2017-02-06 18:15:18,962] Mesuts-MacBook.local/INFO/stdout:
[2017-02-06 18:15:19,963] Mesuts-MacBook.local/INFO/stdout: ON_START running
[2017-02-06 18:15:19,964] Mesuts-MacBook.local/INFO/stdout:
[2017-02-06 18:15:20,966] Mesuts-MacBook.local/INFO/stdout: ON_START running
[2017-02-06 18:15:20,966] Mesuts-MacBook.local/INFO/stdout:
[2017-02-06 18:15:21,968] Mesuts-MacBook.local/INFO/locust.runners: All locusts hatched: User: 5
[2017-02-06 18:15:21,969] Mesuts-MacBook.local/INFO/locust.runners: Resetting stats

[2017-02-06 18:15:31,089] Mesuts-MacBook.local/INFO/locust.runners: All locusts dead

[2017-02-06 18:15:31,089] Mesuts-MacBook.local/INFO/locust.main: Shutting down (exit code 0), bye
`

after fix:
`
python /Users/mesutgunes/Projects/locust/locust.py -f all_links.py --host=http://test.com --clients=5 --hatch-rate=1 --num-request=25 --no-web --only-summary
[2017-02-06 18:13:51,758] Mesuts-MacBook.local/INFO/locust.main: Starting Locust 0.8a2
[2017-02-06 18:13:51,758] Mesuts-MacBook.local/INFO/locust.runners: Hatching and swarming 5 clients at the rate 1 clients/s...
[2017-02-06 18:13:51,759] Mesuts-MacBook.local/INFO/stdout: ON_START running
[2017-02-06 18:13:51,759] Mesuts-MacBook.local/INFO/stdout:
[2017-02-06 18:13:56,768] Mesuts-MacBook.local/INFO/locust.runners: All locusts hatched: User: 5
[2017-02-06 18:13:56,768] Mesuts-MacBook.local/INFO/locust.runners: Resetting stats

[2017-02-06 18:14:07,871] Mesuts-MacBook.local/INFO/locust.runners: All locusts dead

[2017-02-06 18:14:07,871] Mesuts-MacBook.local/INFO/locust.main: Shutting down (exit code 0), bye.
Name # reqs # fails Avg Min Max | Median req/s

`

@cgoldberg
Copy link
Member

this isn't a fix... it just changes behavior of on_start to something completely different. on_start is supposed to run for each locust before tasks are scheduled. I think you have misunderstood the purpose of on_start.

rejecting this and will not merge.

@cgoldberg cgoldberg closed this Feb 6, 2017
@gunesmes gunesmes deleted the fix/on_start_run_one_time branch November 3, 2023 19:38
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

Successfully merging this pull request may close these issues.

2 participants