@@ -32,7 +32,7 @@ OPTIONS:
32
32
-- addrs <addrs >... MQTT broker endpoint list , " host1:port host2:port host3:port" [default : localhost : 1883 ]
33
33
- c , -- conns <conns > The number of connections [default : 1000 ]
34
34
- 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 }]
36
36
- u , -- username <username > Username
37
37
- p , -- password <password > Password
38
38
- h , -- handshake - timeout <handshake - timeout > Handshake timeout , Seconds [default : 30 ]
@@ -69,19 +69,30 @@ $ rmqtt-bench v3 -c 25000
69
69
70
70
For example, create 25K concurrent connections concurrently and subscribe
71
71
``` rust
72
- rmqtt - bench v3 - c 25000 - S - t iot / {no }
72
+ $ rmqtt - bench v3 - c 25000 - S - t iot / {no }
73
73
```
74
74
75
75
### Pub Benchmark
76
76
77
77
For example, create 100 concurrent connections and publish messages concurrently
78
78
``` rust
79
- rmqtt - bench v3 - c 100 - S - t iot / {no } - P
79
+ $ rmqtt - bench v3 - c 100 - S - t iot / {no } - P
80
80
```
81
81
82
82
For example, 100 concurrent connections are created and 1000 messages are published before exiting
83
83
``` 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
85
96
```
86
97
87
98
### Control Benchmark
@@ -90,7 +101,7 @@ Simple control, simulate real scenes.
90
101
For example, 1000 concurrent connections are created at the same time,
91
102
and then 20% of the connections are disconnected or reconnected every second
92
103
``` 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
94
105
```
95
106
96
107
### Script Benchmark
0 commit comments