{"id":13582506,"url":"https://github.com/krylovsk/mqtt-benchmark","last_synced_at":"2025-04-06T14:30:59.912Z","repository":{"id":33384119,"uuid":"37029094","full_name":"krylovsk/mqtt-benchmark","owner":"krylovsk","description":"MQTT broker benchmarking tool","archived":false,"fork":false,"pushed_at":"2023-02-25T01:51:12.000Z","size":35,"stargazers_count":299,"open_issues_count":6,"forks_count":80,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-11-05T22:41:37.317Z","etag":null,"topics":["benchmarking","mqtt"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krylovsk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-06-07T19:25:41.000Z","updated_at":"2024-10-26T12:12:20.000Z","dependencies_parsed_at":"2023-12-19T01:01:46.596Z","dependency_job_id":"439cfdcc-9bd3-4d46-a1ea-55a74ad08616","html_url":"https://github.com/krylovsk/mqtt-benchmark","commit_stats":{"total_commits":24,"total_committers":7,"mean_commits":"3.4285714285714284","dds":"0.41666666666666663","last_synced_commit":"f46efba1a710a117c80d0ba94281e0a99e7b96a4"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krylovsk%2Fmqtt-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krylovsk%2Fmqtt-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krylovsk%2Fmqtt-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krylovsk%2Fmqtt-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krylovsk","download_url":"https://codeload.github.com/krylovsk/mqtt-benchmark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247495770,"owners_count":20948105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmarking","mqtt"],"created_at":"2024-08-01T15:02:46.847Z","updated_at":"2025-04-06T14:30:59.653Z","avatar_url":"https://github.com/krylovsk.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"MQTT benchmarking tool\n=========\n\nA simple MQTT (broker) benchmarking tool.\n\nInstallation:\n\n```sh\ngo install github.com/krylovsk/mqtt-benchmark@main\n```\n\nThe tool supports multiple concurrent clients, configurable message size, etc:\n\n```sh\n$ ./mqtt-benchmark -h\nUsage of ./mqtt-benchmark:\n  -broker string\n    \tMQTT broker endpoint as scheme://host:port (default \"tcp://localhost:1883\")\n  -broker-ca-cert string\n    \tPath to broker CA certificate in PEM format\n  -client-cert string\n    \tPath to client certificate in PEM format\n  -client-key string\n    \tPath to private clientKey in PEM format\n  -client-prefix string\n    \tMQTT client id prefix (suffixed with '-\u003cclient-num\u003e' (default \"mqtt-benchmark\")\n  -clients int\n    \tNumber of clients to start (default 10)\n  -count int\n    \tNumber of messages to send per client (default 100)\n  -format string\n    \tOutput format: text|json (default \"text\")\n  -insecure\n    \tSkip TLS certificate verification\n  -message-interval int\n    \tTime interval in seconds to publish message (default 1)\n  -password string\n    \tMQTT client password (empty if auth disabled)\n  -payload string\n    \tMQTT message payload. If empty, then payload is generated based on the size parameter\n  -qos int\n    \tQoS for published messages (default 1)\n  -quiet\n    \tSuppress logs while running\n  -ramp-up-time int\n    \tTime in seconds to generate clients by default will not wait between load request\n  -size int\n    \tSize of the messages payload (bytes) (default 100)\n  -topic string\n    \tMQTT topic for outgoing messages (default \"/test\")\n  -username string\n    \tMQTT client username (empty if auth disabled)\n  -wait int\n    \tQoS 1 wait timeout in milliseconds (default 60000)\n```\n\n\u003e NOTE: if `count=1` or `clients=1`, the sample standard deviation will be returned as `0` (convention due to the [lack of NaN support in JSON](https://tools.ietf.org/html/rfc4627#section-2.4))\n\nTwo output formats supported: human-readable plain text and JSON.\n\nExample use and output:\n\n```sh\n\u003e mqtt-benchmark --broker tcp://broker.local:1883 --count 100 --size 100 --clients 100 --qos 2 --format text\n....\n\n======= CLIENT 27 =======\nRatio:               1 (100/100)\nRuntime (s):         16.396\nMsg time min (ms):   9.466\nMsg time max (ms):   1880.769\nMsg time mean (ms):  150.193\nMsg time std (ms):   201.884\nBandwidth (msg/sec): 6.099\n\n========= TOTAL (100) =========\nTotal Ratio:                 1 (10000/10000)\nTotal Runime (sec):          16.398\nAverage Runtime (sec):       15.514\nMsg time min (ms):           7.766\nMsg time max (ms):           2034.076\nMsg time mean mean (ms):     140.751\nMsg time mean std (ms):      13.695\nAverage Bandwidth (msg/sec): 6.761\nTotal Bandwidth (msg/sec):   676.112\n```\n\nWith payload specified:\n\n```sh\n\u003e mqtt-benchmark --broker tcp://broker.local:1883 --count 100 --clients 10 --qos 1 --topic house/bedroom/temperature --payload {\\\"temperature\\\":20,\\\"timeStamp\\\":1597314150}\n....\n\n======= CLIENT 0 =======\nRatio:               1.000 (100/100)\nRuntime (s):         0.725\nMsg time min (ms):   1.999\nMsg time max (ms):   22.997\nMsg time mean (ms):  6.955\nMsg time std (ms):   3.523\nBandwidth (msg/sec): 137.839\n\n========= TOTAL (1) =========\nTotal Ratio:                 1.000 (100/100)\nTotal Runtime (sec):         0.736\nAverage Runtime (sec):       0.725\nMsg time min (ms):           1.999\nMsg time max (ms):           22.997\nMsg time mean mean (ms):     6.955\nMsg time mean std (ms):      0.000\nAverage Bandwidth (msg/sec): 137.839\nTotal Bandwidth (msg/sec):   137.839\n```\n\nSimilarly, in JSON:\n\n```json\n\u003e mqtt-benchmark --broker tcp://broker.local:1883 --count 100 --size 100 --clients 100 --qos 2 --format json --quiet\n{\n    runs: [\n        ...\n        {\n            \"id\": 61,\n            \"successes\": 100,\n            \"failures\": 0,\n            \"run_time\": 16.142762197,\n            \"msg_tim_min\": 12.798859,\n            \"msg_time_max\": 1273.9553740000001,\n            \"msg_time_mean\": 147.66799521,\n            \"msg_time_std\": 152.08244221156286,\n            \"msgs_per_sec\": 6.194726700402251\n        }\n    ],\n    \"totals\": {\n        \"successes\": 10000,\n        \"failures\": 0,\n        \"total_run_time\": 16.153741746,\n        \"avg_run_time\": 15.14702422494,\n        \"msg_time_min\": 7.852086000000001,\n        \"msg_time_max\": 1285.241845,\n        \"msg_time_mean_avg\": 136.4360292677,\n        \"msg_time_mean_std\": 12.816965054355633,\n        \"total_msgs_per_sec\": 681.0374046459865,\n        \"avg_msgs_per_sec\": 6.810374046459865\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrylovsk%2Fmqtt-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrylovsk%2Fmqtt-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrylovsk%2Fmqtt-benchmark/lists"}