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

stats with all zeros for clients > 1 #832

Closed
ecc256 opened this issue Jul 3, 2018 · 8 comments
Closed

stats with all zeros for clients > 1 #832

ecc256 opened this issue Jul 3, 2018 · 8 comments

Comments

@ecc256
Copy link

ecc256 commented Jul 3, 2018

Locust 0.8.1
Getting stats with all zeros when # clients > 1
Same locustfile.py (very basic) produces good stats with single client.
Am I missing something... obvious?

@cgoldberg
Copy link
Member

Am I missing something... obvious?

yes.. the issue template you skipped filling out was pretty obvious.
Instead, you've opted to provide nearly zero information, so there is no chance of diagnosing.

@ecc256
Copy link
Author

ecc256 commented Jul 5, 2018

Sorry, here we go:

Description of issue / feature request

stats with all zeros for clients > 1

Expected behavior

Actual behavior

See output below

Environment settings (for bug reports)

Windows Server 2016
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)]
Locust 0.8.1

Steps to reproduce (for bug reports)

locustfile.py

from locust import HttpLocust, TaskSet, task

class TaskSetX(TaskSet):
	def perform(self):
		self.client.get('/')

	@task
	def task1(self):
		self.perform()

class WebsiteUser(HttpLocust):
	host = 'https://www.google.com'
	task_set = TaskSetX
	min_wait = 500
	max_wait = 1000



===========================================================================

locust --no-web --clients=2 --num-request=2 --hatch-rate=1  --only-summary
[2018-07-05 14:36:22,663] X1/INFO/locust.main: Starting Locust 0.8.1
[2018-07-05 14:36:22,663] X1/INFO/locust.runners: Hatching and swarming 2 clients at the rate 1 clients/s...
[2018-07-05 14:36:24,678] X1/INFO/locust.runners: All locusts hatched: WebsiteUser: 2
[2018-07-05 14:36:24,678] X1/INFO/locust.runners: Resetting stats

[2018-07-05 14:36:24,678] X1/INFO/locust.runners: All locusts dead

[2018-07-05 14:36:24,678] X1/INFO/locust.main: Shutting down (exit code 0), bye.
 Name                                                          # reqs      # fails     Avg     Min     Max  |  Median   req/s
--------------------------------------------------------------------------------------------------------------------------------------------
 GET /                                                              0     0(0.00%)       0       0       0  |       0    0.00
--------------------------------------------------------------------------------------------------------------------------------------------
 Total                                                              0     0(0.00%)                                       0.00

Percentage of the requests completed within given times
 Name                                                           # reqs    50%    66%    75%    80%    90%    95%    98%    99%   100%
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------


===========================================================================

locust --no-web --clients=1 --num-request=2 --hatch-rate=1  --only-summary
[2018-07-05 14:37:02,382] X1/INFO/locust.main: Starting Locust 0.8.1
[2018-07-05 14:37:02,382] X1/INFO/locust.runners: Hatching and swarming 1 clients at the rate 1 clients/s...
[2018-07-05 14:37:03,408] X1/INFO/locust.runners: All locusts hatched: WebsiteUser: 1
[2018-07-05 14:37:03,408] X1/INFO/locust.runners: Resetting stats

[2018-07-05 14:37:03,408] X1/INFO/locust.runners: All locusts dead

[2018-07-05 14:37:03,408] X1/INFO/locust.main: Shutting down (exit code 0), bye.
 Name                                                          # reqs      # fails     Avg     Min     Max  |  Median   req/s
--------------------------------------------------------------------------------------------------------------------------------------------
 GET /                                                              0     0(0.00%)       0       0       0  |       0    0.00
--------------------------------------------------------------------------------------------------------------------------------------------
 Total                                                              0     0(0.00%)                                       0.00

Percentage of the requests completed within given times
 Name                                                           # reqs    50%    66%    75%    80%    90%    95%    98%    99%   100%
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------


===========================================================================

locust --no-web --clients=1 --num-request=2 --hatch-rate=1  --only-summary
[2018-07-05 14:37:05,680] X1/INFO/locust.main: Starting Locust 0.8.1
[2018-07-05 14:37:05,680] X1/INFO/locust.runners: Hatching and swarming 1 clients at the rate 1 clients/s...
[2018-07-05 14:37:06,683] X1/INFO/locust.runners: All locusts hatched: WebsiteUser: 1
[2018-07-05 14:37:06,683] X1/INFO/locust.runners: Resetting stats

[2018-07-05 14:37:07,832] X1/INFO/locust.runners: All locusts dead

[2018-07-05 14:37:07,835] X1/INFO/locust.main: Shutting down (exit code 0), bye.
 Name                                                          # reqs      # fails     Avg     Min     Max  |  Median   req/s
--------------------------------------------------------------------------------------------------------------------------------------------
 GET /                                                              2     0(0.00%)      59      59      59  |      59    0.00
--------------------------------------------------------------------------------------------------------------------------------------------
 Total                                                              2     0(0.00%)                                       0.00

Percentage of the requests completed within given times
 Name                                                           # reqs    50%    66%    75%    80%    90%    95%    98%    99%   100%
--------------------------------------------------------------------------------------------------------------------------------------------
 GET /                                                               2     59     59     59     59     59     59     59     59     59
--------------------------------------------------------------------------------------------------------------------------------------------

@cgoldberg
Copy link
Member

you are trying to run a test that sends 2 requests?

@ecc256
Copy link
Author

ecc256 commented Jul 5, 2018

It's the smallest # to reproduce behavior.
Any # show same result.

@aldenpeterson-wf
Copy link
Contributor

@ecc256 you can probably use this #583 to solve this, locust resets the requests once the clients are finished hatching but it's possible that your entire test runs too fast.

@ecc256
Copy link
Author

ecc256 commented Jul 15, 2018

@aldenpeterson-wf,
Worked like a charm,
Thanks! 👍
BTW: I run
pip install git+https://github.com/locustio/locust.git

It updated msgpack-0.5.6, everything else was uptodate already:
Successfully installed msgpack-0.5.6

@ecc256
Copy link
Author

ecc256 commented Jul 30, 2018

Worked like a charm

My bad.
Looks like it’s hit or miss.
Sometimes it returns good stats and sometimes it is all zeros with same exact use case
--clients=300 --num-request=500
But work right with --clients=1 every time, tho.

Any idea, what else should I try?

@vineetsharma883
Copy link

Facing same issue in current version of locust - 2.8.3

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