A Vertica client for use with the locust.io load testing tool
Project description
The package includes an object that you can use as a client for the locust.io load testing tool. The client can be used to write load testing workloads that automatically connect to a Vertica database.
The client also integrates with a graphite backend to be able to flow metrics to it.
Installation
To install this package:
pip install vertica_locust_client
Locust Command Line Parameters
This will automatically add parameters to locust that will control how to connect to Vertica and the graphite backend. These parameters are also exposed in the webUI.
--user ID of user to connect to Vertica with (defaults to dbadmin) --password Password of the Vertica user ID (defaults to empty string) --carbon-endpoint The carbon endpoint to connect to. The endpoint is defined as: host[:port][,host[:port]...] --carbon-namespace The namespace for the carbon metric. This is treated as the prefix when constructing the full metric name.
Sample locustfile
Here is a sample locustfile.py to show the client in action. This will issue a simple query to count the number of sessions in the database.
from locust import task from vertica_locust_client import VerticaUser class SessionCounterUser(VerticaUser): def __init__(self, environment): super().__init__(environment) @task def query_users(self): with self.client.make_cursor(carbon_metric="query") as cur: cur.execute(''' select count(session_id) sessions from v_monitor.sessions where session_id not in ( select session_id from current_session ) ''')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for vertica_locust_client-0.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1173da255c2a3cbc1a2e90b33b9ef7f20a1f185fb27d917cefe8414b33f4cc5c |
|
MD5 | 7682b72177ba50382456567a3aef4036 |
|
BLAKE2b-256 | 7acb2bfa19e14ee8d36b15ace95085ea926d4657ccdd97341e170f55e308e0b5 |