Coder Social home page Coder Social logo

coolpy7_benchmark's Introduction

coolpy7_benchmark

This is a simple MQTT benchmark tool written in Golang. The main purpose of the tool is to benchmark how many concurrent connections a MQTT broker could support.

QuickStart

$ git clone https://github.com/Coolpy7/coolpy7_benchmark.git
$ cd bin

//sub test
./go_build_cp7_bench_sub_go_linux -workers=4000000 -cid=tqy -topic=null -qos=0 -url=tcp://192.168.200.238:1883 -keepalive=60000s -clear=true

//pub test
./go_build_cp7_bench_pub_go_linux -cid=cp7 -clear=true -keepalive=300s -qos=0 -s=256 -topic=a/b/c -url=tcp://192.168.100.2:1883 -workers=500

Sub Benchmark

$ ./go_build_cp7_bench_sub_go_linux -h
Usage of ./go_build_cp7_bench_sub_go_linux:
  -cid string
    	client id start with (default "testclient")
  -clear
    	clear session (default true)
  -keepalive string
    	keepalive (default "300s")
  -qos uint
    	sub qos level
  -topic string
    	the used topic (default "cp7sub%i")
  -url string
    	broker url (default "tcp://127.0.0.1:1883")
  -workers int
    	number of workers (default 100)

  -h                 help information
  -cid               client id start with this value profix + workers id [like: testclient0]
  -clear             clean session [default: true]
  -keepalive         keep alive in seconds [default: 300]
  -qos               subscribe qos [default: 0]
  -topic             topic subscribe, support %i variables
  -url               mqtt connect string [like: tcp://username:[email protected]:1883]
  -workers           mqtt connection clients count [default: 100]

Pub Benchmark

$ ./go_build_cp7_bench_pub_go_linux -h
Usage of ./go_build_cp7_bench_pub_go_linux:
  -I int
    	interval of publishing message(ms) (default 1000)
  -cid string
    	client id start with (default "client")
  -clear
    	clear session (default true)
  -i int
    	interval of connecting to the broker(ms) (default 10)
  -keepalive string
    	keepalive (default "300s")
  -qos uint
    	pub qos level
  -s int
    	payload size (default 256)
  -topic string
    	pub topic (default "cp7sub%i")
  -url string
    	broker url (default "tcp://username:[email protected]:1883")
  -workers int
    	number of workers (default 200)

  -h                 help information
  -cid               client id start with this value profix + workers id [like: client0]
  -clear             clean session [default: true]
  -keepalive         keep alive in seconds [default: 300]
  -qos               subscribe qos [default: 0]
  -topic             topic subscribe, support %i variables
  -url               mqtt connect string [like: tcp://username:[email protected]:1883]
  -workers           mqtt connection clients count [default: 100]
  -s                 payload size [default: 256]
  -I                 interval of publishing message(ms) [default 1000]
  -i                 interval of connecting to the broker(ms) [default 10]

coolpy7_benchmark's People

Contributors

jacoblai avatar

Watchers

 avatar  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.