1 Star 0 Fork 3

SeanHayes / coolpy7_benchmark

forked from 叶见光 / coolpy7_benchmark 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

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:password@192.168.100.2: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:password@192.168.100.2: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:password@192.168.100.2: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]

空文件

简介

暂无描述 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/seanhayes/coolpy7_benchmark.git
git@gitee.com:seanhayes/coolpy7_benchmark.git
seanhayes
coolpy7_benchmark
coolpy7_benchmark
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891