fromlocust_pluginsimportrun_single_user,listenersfromlocustimportHttpUser,task,eventsimportosos.environ['PGHOST']='这里填TimescaleDB数据库IP'os.environ['PGUSER']='postgres'os.environ['PGPASSWORD']='123456'os.environ['PGDATABASE']='tutorial'classMyUser(HttpUser):@taskdefindex(self):self.client....
TimescaleListener是locust的一个插件,主要作用是把压测过程中产生的数据存到配置了Timescale 功能的Postgres 数据库中,并用Grafana图表显示出来,相比于locust原生的界面,使用该插件后能够显示历史数据,能够显示的内容也比较丰富,极大提升了locust的可用性和易用性,十分推荐使用。 需要的组件 locust Postgres Grafana 安装...
from locust_plugins.users.kafka import KafkaUser from locust import task, run_single_user import os class MyUser(KafkaUser): bootstrap_servers = os.environ["LOCUST_KAFKA_SERVERS"] @task def t(self): self.client.send("lafp_test", b"payload") # if you dont poll immediately after sending...
ccd679c5eb locust-plugins/locust_plugins/listeners.py / Jump to Go to file cyberw Timescale listener: Fix time zone confusion issue with passing run_id… … Latest commit ccd679c Mar 23, 2023 History 3 contributors 497 lines (431 sloc) 19.3 KB Raw Blame from con...
Having this separate from "Locust core" allows the plugins to evolve faster (at the expense of being less mature), and avoids bloating Locust with functionality you might not be interested in. Installation pip install locust-plugins Configuration ...
A set of useful plugins/extensions for Locust. Contribute to SvenskaSpel/locust-plugins development by creating an account on GitHub.
Code Latest commit Git stats 2 commits Files Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Dockerfile About Dockerfile Locust with Locust Plugins Stars 0 stars Watchers 2 watching Forks 0 forks Report repository Releases 1 2.15...
from locust.env import Environment env = Environment(user_classes=[Manual]) env.create_local_runner() env.runner.start(1, spawn_rate=1) env.runner.greenlet.join() i got this error C:\Users\andreabisello\AppData\Local\Programs\Python\Python310\python.exe C:/src/locust-loading-testing/playwr...
2 changes: 1 addition & 1 deletion 2 locust_plugins/users/mqtt.py Original file line numberDiff line numberDiff line change @@ -118,7 +118,7 @@ def __init__( self.on_publish = self._on_publish_cb self.on_subscribe = self._on_subscribe_cb if self.protocol == mqtt.MQTTv5: if...
locust_plugins mongoreader.py test test_cloudwatch_plugin.py 9 changes: 6 additions & 3 deletions 9 locust_plugins/mongoreader.py Original file line numberDiff line numberDiff line change @@ -34,9 +34,12 @@ def __init__( """ self.timestamp_field = timestamp_field self.coll: Colle...