Skip to content

Commit 773735b

Browse files
author
rmqtt
committed
Update the document
1 parent e523806 commit 773735b

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

README.md

+16-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ OPTIONS:
3232
--addrs <addrs>... MQTT broker endpoint list, "host1:port host2:port host3:port" [default: localhost:1883]
3333
-c, --conns <conns> The number of connections [default: 1000]
3434
-i, --interval <interval> Interval of connecting to the broker, millisecond [default: 0]
35-
-r, --id-pattern <id-pattern> Client id pattern, {no} - Connection Serial Number, {random} - The random number [default: {no}]
35+
-E, --id-pattern <id-pattern> Client id pattern, {no} - Connection Serial Number, {random} - The random number [default: {no}]
3636
-u, --username <username> Username
3737
-p, --password <password> Password
3838
-h, --handshake-timeout <handshake-timeout> Handshake timeout, Seconds [default: 30]
@@ -69,19 +69,30 @@ $ rmqtt-bench v3 -c 25000
6969

7070
For example, create 25K concurrent connections concurrently and subscribe
7171
```rust
72-
rmqtt-bench v3 -c 25000 -S -t iot/{no}
72+
$ rmqtt-bench v3 -c 25000 -S -t iot/{no}
7373
```
7474

7575
### Pub Benchmark
7676

7777
For example, create 100 concurrent connections and publish messages concurrently
7878
```rust
79-
rmqtt-bench v3 -c 100 -S -t iot/{no} -P
79+
$ rmqtt-bench v3 -c 100 -S -t iot/{no} -P
8080
```
8181

8282
For example, 100 concurrent connections are created and 1000 messages are published before exiting
8383
```rust
84-
rmqtt-bench v3 -c 100 -S -t iot/{no} -P -l 1000
84+
$ rmqtt-bench v3 -c 100 -S -t iot/{no} -P -l 1000
85+
```
86+
87+
### Sub and Pub Benchmark
88+
89+
For example, create 10K concurrent connections concurrently and subscribe.
90+
Then create 100 concurrent connections and publish messages to 10K connections
91+
```rust
92+
$ rmqtt-bench v3 -c 10000 -S -t iot/{no}
93+
```
94+
```rust
95+
$ rmqtt-bench v3 -c 100 --id-pattern pub-{no} -P -t iot/{no} -R 0 10000 -I 10
8596
```
8697

8798
### Control Benchmark
@@ -90,7 +101,7 @@ Simple control, simulate real scenes.
90101
For example, 1000 concurrent connections are created at the same time,
91102
and then 20% of the connections are disconnected or reconnected every second
92103
```rust
93-
rmqtt-bench v3 -c 1000 -T -L 1000 -D 0.2
104+
$ rmqtt-bench v3 -c 1000 -T -L 1000 -D 0.2
94105
```
95106

96107
### Script Benchmark

0 commit comments

Comments
 (0)