GithubHelp home page GithubHelp logo

doytsujin / locust-plugins Goto Github PK

View Code? Open in Web Editor NEW

This project forked from svenskaspel/locust-plugins

0.0 1.0 0.0 214 KB

A set of useful plugins/extensions for Locust

License: Apache License 2.0

Python 99.82% Makefile 0.18%

locust-plugins's Introduction

Locust Plugins

The purpose of this project is to gather a curated set of plugins/extensions for Locust.

Locust itself is a "bare bones" load generation tool (compared to for example JMeter or Gatling) and it is left to the user to build even basic functionality (like reading test data from a database, limiting the request rate to a certain value, etc). Forcing everyone to reinvent the wheel is a big waste, and makes using Locust harder than it needs to be.

So I decided to publish my own plugins and hope that others (maybe you?) will contribute their solutions to common Locust use cases.

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.

There are a couple of plugin types:

Listeners

  • Listen to events and log things
    • Log and graph results using TimescaleDB and Grafana (source, example)
    • PrintListener (prints prints every request with response time etc) (source)
    • JmeterListener (writes a jmeter-like output file) (source, example)
    • ApplicationInsightsListener (writes the test logs to Azure Application Insights) (source, example)
    • RescheduleTaskOnFailListener / ExitOnFailListener / StopUserOnFailListener / (perform actions when a request fails) (source)

Users

Readers

Wait time

Debug

  • Support for running a single User in the debugger (source, example)

Transaction manager

  • Support for logging transactions (aggregating multiple requests or other actions) (source, example)

Command line options

  • Additional locust command line options provided (source, examples)
    • Iteration limit (-i), stops Locust after a certain number of task iterations
    • Checks (--check-rps, --check-fail-ratio, --check-avg-response-time), gives an error return code if certain conditions are not met

Further examples

Have a look at the example locustfiles to learn how to use the plugins.

locust-swarm

These plugins work well together with locust-swarm

Installation

pip install locust-plugins

Configuration

Configuration is mostly done through environment variables. You will get an exception if one is missing, and they should either be self-explanatory, or explained in the code where they are used. I recommend setting them permanently in your bash profile, so you dont have to set them every time or make your command line super-long.

Contributions

Contributions are very welcome! ๐Ÿ˜

For guidelines, see CONTRIBUTING.md

License

Copyright 2019 AB SvenskaSpel

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

locust-plugins's People

Contributors

ctstone avatar cyberw avatar denniskrone avatar guilhermeslucas avatar howardosborne avatar joaogfarias avatar stasgrishaev avatar

Watchers

 avatar

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.