emqtt/emqtt_benchmark 测试工具

EMQTT Benchmark是一款用Erlang编写的简单MQTT基准测试工具,用于评估MQTT代理能支持的最大并发连接数。该工具包括发布(Pub)和订阅(Sub)两个基准测试模块,用户可以通过多种选项进行配置。
Erlang MQTT Benchmark
Erlang Makefile
Clone or download 
Create new file Upload files Find file
Branch:  master 
New pull request
Fetching latest commit…

 README.md

emqtt benchmark

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

Build first

make 

Sub Benchmark

$ ./emqtt_bench_sub --help
Usage: emqtt_bench_sub [--help <help>] [-h [<host>]] [-p [<port>]]
                       [-c [<count>]] [-i [<interval>]] [-t <topic>]
                       [-q [<qos>]] [-u <username>] [-P <password>]
                       [-k [<keepalive>]] [-C [<clean>]]
                       [--ifaddr <ifaddr>]

  --help             help information
  -h, --host         mqtt server hostname or IP address [default: localhost]
  -p, --port         mqtt server port number [default: 1883]
  -c, --count        max count of clients [default: 200]
  -n, --startnumber  start number [default: 0]
  -i, --interval     interval of connecting to the broker [default: 10]
  -t, --topic        topic subscribe, support %u, %c, %i variables
  -q, --qos          subscribe qos [default: 0]
  -u, --username     username for connecting to server
  -P, --password     password for connecting to server
  -k, --keepalive    keep alive in seconds [default: 300]
  -C, --clean        clean session [default: true]
  --ifaddr           local ipaddress or interface address

For example, create 50K concurrent clients at the arrival rate of 100/sec:

./emqtt_bench_sub -c 50000 -i 10 -t bench/%i -q 2

Pub Benchmark

$ ./emqtt_bench_pub --help
Usage: emqtt_bench_pub [--help <help>] [-h [<host>]] [-p [<port>]]
                       [-c [<count>]] [-i [<interval>]]
                       [-I [<interval_of_msg>]] [-u <username>]
                       [-P <password>] [-t <topic>] [-s [<size>]]
                       [-q [<qos>]] [-r [<retain>]] [-k [<keepalive>]]
                       [-C [<clean>]] [--ifaddr <ifaddr>]

  --help                 help information
  -h, --host             mqtt server hostname or IP address [default:
                         localhost]
  -p, --port             mqtt server port number [default: 1883]
  -c, --count            max count of clients [default: 200]
  -n, --startnumber      start number [default: 0]
  -i, --interval         interval of connecting to the broker [default: 10]
  -I, --interval_of_msg  interval of publishing message(ms) [default: 1000]
  -u, --username         username for connecting to server
  -P, --password         password for connecting to server
  -t, --topic            topic subscribe, support %u, %c, %i variables
  -s, --size             payload size [default: 256]
  -q, --qos              subscribe qos [default: 0]
  -r, --retain           retain message [default: false]
  -k, --keepalive        keep alive in seconds [default: 300]
  -C, --clean            clean session [default: true]
  --ifaddr               local ipaddress or interface address

For example, create 100 clients and each client publish messages at the rate of 100 msg/sec.

./emqtt_bench_pub -c 100 -I 10 -t bench/%i -s 256

Local interface

./emqtt_bench_pub --ifaddr 192.168.1.10
./emqtt_bench_sub --ifaddr 192.168.2.10

One-way SSL Socket

./emqtt_bench_sub -c 100 -i 10 -t bench/%i -p 8883 -S
./emqtt_bench_pub -c 100 -I 10 -t bench/%i -p 8883 -s 256 -S

Two-way SSL Socket

./emqtt_bench_sub -c 100 -i 10 -t bench/%i -p 8883 --certfile path/to/client-cert.pem --keyfile path/to/client-key.pem
./emqtt_bench_pub -c 100 -i 10 -t bench/%i -s 256 -p 8883 --certfile path/to/client-cert.pem --keyfile path/to/client-key.pem

Notice

You should not set '-c' option more than 60K for TCP ports limit on one interface.

Author

Feng Lee feng@emqtt.io

Traceback (most recent call last): File "tools/extract_clip_feature.py", line 20, in <module> from maskrcnn_benchmark.data import make_data_loader File "/root/.cache/huggingface/forget/lab/shichong/cyy/RECODE/maskrcnn_benchmark/data/__init__.py", line 2, in <module> from .build import make_data_loader, get_dataset_statistics File "/root/.cache/huggingface/forget/lab/shichong/cyy/RECODE/maskrcnn_benchmark/data/build.py", line 12, in <module> from maskrcnn_benchmark.utils.miscellaneous import save_labels File "/root/.cache/huggingface/forget/lab/shichong/cyy/RECODE/maskrcnn_benchmark/utils/miscellaneous.py", line 10, in <module> from maskrcnn_benchmark.structures.boxlist_ops import boxlist_iou File "/root/.cache/huggingface/forget/lab/shichong/cyy/RECODE/maskrcnn_benchmark/structures/boxlist_ops.py", line 7, in <module> from maskrcnn_benchmark.layers import nms as _box_nms File "/root/.cache/huggingface/forget/lab/shichong/cyy/RECODE/maskrcnn_benchmark/layers/__init__.py", line 10, in <module> from .nms import nms File "/root/.cache/huggingface/forget/lab/shichong/cyy/RECODE/maskrcnn_benchmark/layers/nms.py", line 3, in <module> from ._utils import _C File "/root/.cache/huggingface/forget/lab/shichong/cyy/RECODE/maskrcnn_benchmark/layers/_utils.py", line 39, in <module> _C = _load_C_extensions() File "/root/.cache/huggingface/forget/lab/shichong/cyy/RECODE/maskrcnn_benchmark/layers/_utils.py", line 35, in _load_C_extensions extra_include_paths=extra_include_paths, File "/opt/conda/envs/recode/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1296, in load keep_intermediates=keep_intermediates) File "/opt/conda/envs/recode/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1534, in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) File "/opt/conda/envs/recode/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1936, in _import_module_from_library module = importlib.util.module_from_spec(spec) ImportError: /root/.cache/torch_extensions/py37_cu117/torchvision/torchvision.so: cannot open shared object file: No such file or directory
最新发布
06-24
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值