We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
locustfile:
from locust import HttpLocust, TaskSet, task class WebsiteTasks(TaskSet): def on_start(self): pass @task(1) def index(self): self.client.get("/") @task(2) def about(self): self.client.get("/about/") class WebsiteUser(HttpLocust): host = 'http://debugtalk.com' task_set = WebsiteTasks min_wait = 1000 max_wait = 3000
when executing --show-task-ratio or --show-task-ratio-json, exceptions occured.
--show-task-ratio
--show-task-ratio-json
✗ locust -f test.py --show-task-ratio Task ratio per locust class -------------------------------------------------------------------------------- [2017-02-17 11:24:53,538] Leos-MacBook-Air.local/ERROR/stderr: Traceback (most recent call last): [2017-02-17 11:24:53,538] Leos-MacBook-Air.local/ERROR/stderr: File "/Users/Leo/.virtualenvs/locust/bin/locust", line 11, in <module> [2017-02-17 11:24:53,539] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:24:53,539] Leos-MacBook-Air.local/ERROR/stderr: load_entry_point('locustio', 'console_scripts', 'locust')() [2017-02-17 11:24:53,539] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:24:53,539] Leos-MacBook-Air.local/ERROR/stderr: File "/Users/Leo/GitHub/locust/locust/main.py", line 384, in main [2017-02-17 11:24:53,539] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:24:53,539] Leos-MacBook-Air.local/ERROR/stderr: print_task_ratio(locust_classes) [2017-02-17 11:24:53,539] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:24:53,539] Leos-MacBook-Air.local/ERROR/stderr: File "/Users/Leo/GitHub/locust/locust/inspectlocust.py", line 8, in print_task_ratio [2017-02-17 11:24:53,542] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:24:53,542] Leos-MacBook-Air.local/ERROR/stderr: d = get_task_ratio_dict(locusts, total=total, parent_ratio=parent_ratio) [2017-02-17 11:24:53,542] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:24:53,542] Leos-MacBook-Air.local/ERROR/stderr: File "/Users/Leo/GitHub/locust/locust/inspectlocust.py", line 24, in get_task_ratio_dict [2017-02-17 11:24:53,542] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:24:53,542] Leos-MacBook-Air.local/ERROR/stderr: if hasattr(tasks[0], 'weight'): [2017-02-17 11:24:53,542] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:24:53,543] Leos-MacBook-Air.local/ERROR/stderr: TypeError [2017-02-17 11:24:53,543] Leos-MacBook-Air.local/ERROR/stderr: : [2017-02-17 11:24:53,543] Leos-MacBook-Air.local/ERROR/stderr: 'dict_values' object does not support indexing [2017-02-17 11:24:53,543] Leos-MacBook-Air.local/ERROR/stderr:
✗ locust -f test.py --show-task-ratio-json [2017-02-17 11:22:12,623] Leos-MacBook-Air.local/ERROR/stderr: Traceback (most recent call last): [2017-02-17 11:22:12,623] Leos-MacBook-Air.local/ERROR/stderr: File "/Users/Leo/.virtualenvs/locust/bin/locust", line 11, in <module> [2017-02-17 11:22:12,624] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:22:12,624] Leos-MacBook-Air.local/ERROR/stderr: load_entry_point('locustio', 'console_scripts', 'locust')() [2017-02-17 11:22:12,624] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:22:12,624] Leos-MacBook-Air.local/ERROR/stderr: File "/Users/Leo/GitHub/locust/locust/main.py", line 392, in main [2017-02-17 11:22:12,625] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:22:12,625] Leos-MacBook-Air.local/ERROR/stderr: "per_class": get_task_ratio_dict(locust_classes), [2017-02-17 11:22:12,625] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:22:12,625] Leos-MacBook-Air.local/ERROR/stderr: File "/Users/Leo/GitHub/locust/locust/inspectlocust.py", line 24, in get_task_ratio_dict [2017-02-17 11:22:12,628] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:22:12,628] Leos-MacBook-Air.local/ERROR/stderr: if hasattr(tasks[0], 'weight'): [2017-02-17 11:22:12,628] Leos-MacBook-Air.local/ERROR/stderr: [2017-02-17 11:22:12,628] Leos-MacBook-Air.local/ERROR/stderr: TypeError [2017-02-17 11:22:12,628] Leos-MacBook-Air.local/ERROR/stderr: : [2017-02-17 11:22:12,628] Leos-MacBook-Air.local/ERROR/stderr: 'dict_values' object does not support indexing [2017-02-17 11:22:12,628] Leos-MacBook-Air.local/ERROR/stderr:
The text was updated successfully, but these errors were encountered:
e398dcb
Fixed now. Thanks for reporting!
Sorry, something went wrong.
Fixed bug causing --show-task-ratio to crash in Python 3. Fixes locus…
d8fb3dc
…tio#540.
No branches or pull requests
locustfile:
when executing
--show-task-ratio
or--show-task-ratio-json
, exceptions occured.The text was updated successfully, but these errors were encountered: