-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADDED] MQTT: test/bench using external client #4821
Conversation
4554fff
to
62a9ed0
Compare
f43d6be
to
33faf62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this adds in an option to disable the retained msg cache. When would one want to do this? Why are we exposing it I guess is my question.
PR looks fine, just looking for some clarifications.
@derekcollison the option is used only for testing, and is exposed because we use config files in the test utility functions to initialize servers/clusters. I could move the flag into the |
Let's see what @kozlovic has to say, he has done a few of these testing flags / switches for things. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming the proposed change does not cause races (tests not running in parallel), it could be a better way since we would not introduce an non exposed option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e4defa6
to
7ff0ec8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adds a number of MQTT-specific benchmarks, executed with an external test client (see ConnectEverything/mqtt-test#1). This came out of my work on MQTT message delivery issues in 2.10, and is now packaged as a
go test --bench
, and added to CI.The test client uses the Eclipse
paho
library, and can be executed standalone, pointed at an MQTT server. It measures the timing of its operations, and outputs it as JSON of reportable metrics.The benchmarks here run the client, and report back the metrics it outputs. Memory allocations are measured server-only.
Github action
benchmark
is used to compare the benchmark results to the base ref of the PR, or the prior result in a branch. If it fails a 120% threshold, the failure is reported as a comment on the commit(!), and the build fails.To measure the effect of parallel-fetching retained messages (
SUBRET
), addeddisable_retained_message_cache
MQTT option to the server.The following benchmarks are run, covering standalone/cluster, QOS, message sizes to 100K, as well as concurrent clients.
PUB
measures just publishingPUBRET
measures publishing with the retained flag onPUBSUB
measures message delivery times from publisher to subscriberSUBRET
measures delivery of 100* retained messages to new subscriptionsExample of a failure (I rolled back the retained message "fanout" commit):


if you click on the comment link, you get:
TODO
CON
measure CONNECT to CONNACK, with stored sessionsSUB
measuring SUBSCRIBE to SUBACK