pjcalvo / locust-influxdb-listener Goto Github PK
View Code? Open in Web Editor NEWLocustIO base project with a custom influxDB listener.
License: MIT License
LocustIO base project with a custom influxDB listener.
License: MIT License
Hi,
The docker images could be setup in the docker-compose.yml. I'll make a pull request.
locust-influxdb-listener is a great tool.
I wanted to use Amazon Timestream instead of influxdb.
(influxdb Cloud did not work because it is V2)
Copy this repository
I made a locust-timestream-listener.
https://github.com/komikoni/locust-timestream-listener
Not yet completed (locust-grafana-dashboard.json, etc.)
First of all, I wanted to express my gratitude.
Some events that we currently handle are not properly defined an thus we should fix them to make sure the code is clean:
For example:
def test_stop(self, user_count=None, environment: Environment =None) -> None:
self.__register_event(self.node_id, 0, 'test_stopped')
If we look at the code from locust this event does not trigger neither user_count nor environment, so there params are basically useless:
test_stop: EventHook
"""
Fired on each node when a load test is stopped.
"""
Please only look at those that we currently support. To add new events it is better to separate into new issues.
When running locust 2.8.3 with the frontend ui, when I stop a test, I get the following error in the console:
test_stop() got an unexpected keyword argument 'environment'
I have deduced that I can comment out line 94 of __init__.py
from the locust-influxdb-listener
package and this error goes away. I cannot figure out where exactly to allow for this new argument, though.
Right now I need to release manually but I think we can do an Github release that might also include tests.
It would be nice to be able to easily organize the error / exception also by response code.
Currently it store the "full" error as a string, which make it more complex to group by response code.
Would be nice to have typings as much as possible at least on the function parameters so that we can feel safer about modifying code.
Hi,
I think the test_stop declaration is duplicated :
https://github.com/hoodoo-digital/locust-influxdb-listener/blob/d9af1c6387a130b69fffc9f6b5a9e949d846f615/locust_influxdb_listener/__init__.py#L97
I initiate InfluxDBListener on @events.init.add_listener and sometimes the InfluxDB is not up, so python throw me exceptions even if I try/catch the function call.
I noticed that the call to influxdb_client in /locust_influxdb_listener/init.py", line 55 should be catched and return None.
Am I missing something here ?
Traceback (most recent call last):
File "~/.local/lib/python3.7/site-packages/urllib3/connection.py", line 170, in _new_conn
...
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "~/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 706, in urlopen
...
File "~/.local/lib/python3.7/site-packages/urllib3/connection.py", line 182, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f56ba8acc88>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "~/.local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
...
File "~/.local/lib/python3.7/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.5', port=8086): Max retries exceeded with url: /query?q=CREATE+DATABASE+%22locustidb%22&db=locustidb (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f56ba8acc88>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "~/.local/lib/python3.7/site-packages/locust_influxdb_listener/__init__.py", line 55, in __init__
self.influxdb_client.create_database(influxDbSettings.database)
File "/home/locust/.local/lib/python3.8/site-packages/influxdb/client.py", line 746, in create_database
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.