You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,18 +66,40 @@ Usage of ./pubsub-sub-bench:
66
66
Specify client output buffer limits for clients subscribed to at least one pubsub channel or pattern. If the value specified is different that the one present on the DB, this setting will apply.
67
67
-client-update-tick int
68
68
client update tick. (default 1)
69
+
-clients int
70
+
Number of parallel connections. (default 50)
71
+
-cpuprofile string
72
+
write cpu profile to file
69
73
-host string
70
74
redis host. (default "127.0.0.1")
71
75
-json-out-file string
72
76
Name of json output file, if not set, will not print to json.
77
+
-max-number-channels-per-subscriber int
78
+
max number of channels to subscribe to, per connection. (default 1)
79
+
-max-reconnect-interval int
80
+
max reconnect interval. if 0 disable (s)unsubscribe/(s)ubscribe.
73
81
-messages int
74
82
Number of total messages per subscriber per channel.
83
+
-min-number-channels-per-subscriber int
84
+
min number of channels to subscribe to, per connection. (default 1)
85
+
-min-reconnect-interval int
86
+
min reconnect interval. if 0 disable (s)unsubscribe/(s)ubscribe.
87
+
-mode string
88
+
Subscribe mode. Either 'subscribe' or 'ssubscribe'. (default "subscribe")
75
89
-oss-cluster-api-distribute-subscribers
76
90
read cluster slots and distribute subscribers among them.
91
+
-pool_size int
92
+
Maximum number of socket connections per node.
77
93
-port string
78
94
redis port. (default "6379")
79
95
-print-messages
80
96
print messages.
97
+
-rand-seed int
98
+
Random deterministic seed. (default 12345)
99
+
-redis-timeout duration
100
+
determines the timeout to pass to redis connection setup. It adjust the connection, read, and write timeouts. (default 30s)
log.Println(fmt.Sprintf("client %d is a CLUSTER client connected to %v. Subscriber name %s", totalCreatedClients, client.String(), subscriberName))
337
-
}
338
-
} else {
339
-
nodes_pos:=channel_id%nodeCount
340
-
addr:=nodesAddresses[nodes_pos]
341
-
client=nodeClients[nodes_pos]
342
-
if*verbose {
343
-
log.Println(fmt.Sprintf("client %d is a STANDALONE client connected to node %d (address %s). Subscriber name %s", totalCreatedClients, nodes_pos, addr, subscriberName))
log.Println(fmt.Sprintf("client %d is a STANDALONE client connected to node %d (address %s). Subscriber name %s", totalCreatedClients, nodes_pos, addr, subscriberName))
356
343
}
357
-
ifconnectionReconnectInterval>0 {
358
-
log.Println(fmt.Sprintf("Using reconnection interval of %d milliseconds for subscriber: %s", connectionReconnectInterval, subscriberName))
344
+
err=client.Ping(ctx).Err()
345
+
iferr!=nil {
346
+
log.Fatal(err)
359
347
}
360
-
log.Println(fmt.Sprintf("subscriber: %s. Total channels %d: %v", subscriberName, len(channels), channels))
0 commit comments