Coder Social home page Coder Social logo

locust-influxdb-listener's People

Contributors

issamansur avatar jmfiola avatar pjcalvo avatar tyge68 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

locust-influxdb-listener's Issues

Some events are not properly defined.

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.

test_stop() got an unexpected keyword argument 'environment'

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.

Add Response Code to the collected data

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.

Add python typings

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.

uncatchable exception

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.