ValueError: StatsEntry.use_response_times_cache must be set to True
See original GitHub issueI see this on every locust worker running 1.2
:
$ locust --worker --locustfile=main.py
[2020-08-20 11:02:50,637] C02TD0F6GTDX/INFO/locust.main: Starting Locust 1.2
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 854, in gevent._gevent_cgreenlet.Greenlet.run
File "/usr/local/lib/python3.8/site-packages/locust/stats.py", line 766, in stats_history
'response_time_percentile_95': stats.total.get_current_response_time_percentile(0.95) or 0,
File "/usr/local/lib/python3.8/site-packages/locust/stats.py", line 553, in get_current_response_time_percentile
raise ValueError("StatsEntry.use_response_times_cache must be set to True if we should be able to calculate the _current_ response time percentile")
ValueError: StatsEntry.use_response_times_cache must be set to True if we should be able to calculate the _current_ response time percentile
2020-08-20T09:02:50Z <Greenlet at 0x10803f6a0: stats_history(<locust.runners.WorkerRunner object at 0x10806da60)> failed with ValueError
Tried with very basic locust file, same issue:
from locust import HttpUser, TaskSet, task, between
class LoadTestTask(TaskSet):
def on_start(self):
pass
@task(3)
def get_token(self):
pass
class LoadTest(HttpUser):
tasks = [LoadTestTask]
wait_time = between(0.1, 1)
Any idea @cyberw or @vstepanov-lohika-tix?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cyberw Hi~ I made the PR, see https://github.com/locustio/locust/pull/1538
Yes 🙂