RobustMQ Bench CLI Guide
robust-bench is the benchmark CLI for RobustMQ.
At this stage, it supports MQTT and Meta API benchmark workloads.
1. Command Shape
bash
robust-bench mqtt <subcommand> [options]
robust-bench meta <subcommand> [options]Supported <subcommand>:
conn: connection benchmarkpub: publish benchmarksub: subscribe benchmarkmeta placement-create-session: benchmark MetaCreateSession(write)meta placement-list-session: benchmark MetaListSession(read)
2. Common Options
--host: broker host, default127.0.0.1--port: broker port, default1883--count: number of clients, default1000--interval-ms: startup interval in milliseconds, mainly forpub/sub, default0--duration-secs: benchmark duration in seconds forpub/sub, default60--qos: QoS (0|1|2), default0--username/--password: optional credentials--output:table|json, defaulttable
3. Quick Examples
3.1 Connection benchmark
bash
robust-bench mqtt conn \
--host 127.0.0.1 \
--port 1883 \
--count 10000 \
--concurrency 1000 \
--mode createOr hold mode:
bash
robust-bench mqtt conn \
--host 127.0.0.1 \
--port 1883 \
--count 10000 \
--concurrency 1000 \
--mode hold \
--hold-secs 603.2 Publish benchmark
bash
robust-bench mqtt pub \
--host 127.0.0.1 \
--port 1883 \
--count 1000 \
--topic bench/%i \
--payload-size 256 \
--message-interval-ms 10 \
--qos 1 \
--duration-secs 1203.3 Subscribe benchmark
bash
robust-bench mqtt sub \
--host 127.0.0.1 \
--port 1883 \
--count 1000 \
--topic bench/# \
--qos 1 \
--duration-secs 1203.4 Meta write benchmark
Single mode:
bash
robust-bench meta placement-create-session \
--host 127.0.0.1 \
--port 1228 \
--count 100000 \
--concurrency 1000 \
--timeout-ms 3000 \
--output tableBatch mode (--batch-size sets sessions per gRPC request):
bash
robust-bench meta placement-create-session \
--host 127.0.0.1 \
--port 1228 \
--count 100000 \
--concurrency 1000 \
--batch-size 100 \
--timeout-ms 3000 \
--output table3.5 Meta read benchmark
bash
robust-bench meta placement-list-session \
--host 127.0.0.1 \
--port 1228 \
--count 100000 \
--concurrency 1000 \
--timeout-ms 3000 \
--output table4. Output Details
The tool reports in two layers:
- Real-time output (every second):
- ops/s
- cumulative ops
- success/failed/timeout/received
- p95/p99 latency
- Final detailed report:
- total/avg/peak throughput
- success/error/timeout rates
- latency percentiles (min/avg/p50/p95/p99/max)
- error distribution
- per-second timeline
