Giter Site home page Giter Site logo

mqtt-stresser's Introduction

MQTT Stresser

Load testing tool to stress MQTT message broker

Build

You need at least golang version 1.12 to build the binaries.

$ mkdir -p ${GOPATH}/src/github.com/inovex/
$ git clone https://github.com/inovex/mqtt-stresser.git ${GOPATH}/src/github.com/inovex/mqtt-stresser/
$ cd ${GOPATH}/src/github.com/inovex/mqtt-stresser/
$ make

This will build the mqtt stresser for all target platforms and write them to the build/ directory. Binaries are provided on Github, see https://github.com/inovex/mqtt-stresser.

If you want to build your own Docker image, simply type make container or see Makefile for further docker build details.

Install

Place the binary somewhere in a $PATH directory and make it executable (chmod +x mqtt-stresser).

Configure

See mqtt-stresser -h for a list of available arguments.

Run

Simple hello-world test using the public broker.mqttdashboard.com broker: (please don't DDoS them :))

$ mqtt-stresser -broker tcp://broker.mqttdashboard.com:1883 -num-clients 10 -num-messages 150 -rampup-delay 1s -rampup-size 10 -global-timeout 180s -timeout 20s

10 worker started
..........
# Configuration
Concurrent Clients: 10
Messages / Client:  1500

# Results
Published Messages: 1500 (100%)
Received Messages:  1500 (100%)
Completed:          10 (100%)
Errors:             0 (0%)

# Publishing Throughput
Fastest: 32431 msg/sec
Slowest: 16044 msg/sec
Median: 25483 msg/sec

  < 17683 msg/sec  20%
  < 24238 msg/sec  40%
  < 25876 msg/sec  60%
  < 29154 msg/sec  70%
  < 30792 msg/sec  90%
  < 32431 msg/sec  100%

# Receiving Througput
Fastest: 1469 msg/sec
Slowest: 214 msg/sec
Median: 552 msg/sec

  < 340 msg/sec  30%
  < 591 msg/sec  50%
  < 716 msg/sec  60%
  < 841 msg/sec  80%
  < 1469 msg/sec  90%
  < 1594 msg/sec  100%

Or using using our Docker image:

$ docker run --rm inovex/mqtt-stresser -broker tcp://broker.mqttdashboard.com:1883 -num-clients 10 -num-messages 150 -rampup-delay 1s -rampup-size 10 -global-timeout 180s -timeout 20s

Develop

Update dependencies

To update the used dependencies to the latest path version run:

make vendor-update vendor

If you want to bump the major version or set a specific version make your change in the go.mod file. Than run

make vendor

mqtt-stresser's People

Contributors

arnisoph avatar jojjer123 avatar hikhvar avatar everactivegit avatar carlospsikick avatar frittentheke avatar invadersmustdie avatar saurabhs0212 avatar flaviostutz avatar

Forkers

elgohr-update

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.