opstree / redis-load-test

A utility to provide easy and fast performance testing for Redis.
https://opstree.github.io
Apache License 2.0
47 stars 36 forks source link

Replace deprecated request_success() and request_failure() with request() from locust.event.Events.request #12

Open thx123 opened 5 months ago

thx123 commented 5 months ago

The deprecated request_success() and request_failure() are already removed in locust.event.Events.request upstream, causing the following error:

File "/Users/htie/coding/redis-load-test/Scripts/redis_get_set.py", line 88, in get_time self.client.query(self.key) File "/Users/htie/coding/redis-load-test/Scripts/redis_get_set.py", line 50, in query events.request_success.fire(

The fix is to simply relace them with request() method name, per: https://stackoverflow.com/questions/76016708/locust-events-object-has-no-attribute-request-success

Verified working with load tests, after the fix, the errors are gone, and all graphs are displayed properly.

thx123 commented 5 months ago

I can't push local branch to this repo. Here is the simple fix from my fork:

https://github.com/opstree/redis-load-test/commit/e4f20922c47ceeaab91d5476fdfda9436319708d