-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfan_in.bdl
57 lines (50 loc) · 2.09 KB
/
fan_in.bdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!benchDL
#######
# Scenario:
# A single subscriber reading from "<MF_CHANNEL>/#" topic
# 10000 publisher publishing to exclusive topic "<MF_CHANNEL>/<client_id>"
# Overall msg rate: 10 000 msg/s
# Message size: 100 random bytes
# Running time: 5 min
# QoS level: 2
# NOTE: Update values in test, according to your values
# <MF_MQTT_ENPOINT> = IP/domain of your MQTT endpoint
# <MF_THING_1_ID> = First thing ID of pre-provisioned Mainflux thing
# <MF_THING_1_key> = First thing key of pre-provisioned Mainflux thing
# <MF_THING_2_ID> = Second thing ID of pre-provisioned Mainflux thing
# <MF_THING_2_key> = Second thing key of pre-provisioned Mainflux thing.
# <MF_CHANNEL> = pre-provisioned channel where thing is connected
#######
make_install(git = "https://github.com/erlio/vmq_mzbench.git",
branch = "master")
pool(size = 1,
worker_type = mqtt_worker):
connect([t(host, "<MF_MQTT_ENDPOINT"),
t(port, 1883),
t(client,"subscriber1"),
t(clean_session,true),
t(keepalive_interval,60),
t(username, "<MQTT_THING_1_ID>"),
t(password, "<MQTT_THING_1_KEY>"),
t(proto_version,4), t(reconnect_timeout,4)
])
wait(1 sec)
subscribe("<MF_CHANNEL>/#", 2)
pool(size = 10000,
worker_type = mqtt_worker,
worker_start = poisson(10000 rps)):
connect([t(host, "157.245.26.18"),
t(port, 1883),
t(client,fixed_client_id("publisher-", worker_id())),
t(clean_session,true),
t(keepalive_interval,60),
t(username, "<MQTT_THING_2_ID>"),
t(password, "<MQTT_THING_2_KEY>"),
t(proto_version,4), t(reconnect_timeout,4)
])
set_signal(connect1, 1)
wait_signal(connect1, 100)
wait(5 sec)
loop(time = 5 min, rate = 1 rps):
publish_to_self("<MF_CHANNEL>/", random_binary(100), 2)
disconnect()