Benchmarking script which is run periodically using a systemd timer.
Technical summary
The following details the technical aspects of the plugin to get an idea what systems it supports.
| Languages | python3 |
| CPU Architectures | all/noarch. Not CPU specific |
| Supported init systems | systemd |
| Required Dependencies | python3-paho-mqtt |
| Optional Dependencies (feature specific) | - |
The following linux package formats are provided on the releases page and also in the tedge-community repository:
| Operating System | Repository link |
|---|---|
| Debian/Raspbian (deb) | |
| Alpine Linux (apk) | |
| RHEL/CentOS/Fedora (rpm) |
- The following service will be installed
tedge-benchmark(service and timer) (triggered every hour on the hour)tedge-benchmark.pyscript which is called from the service, however it can also be called manually for adhoc usage
The following packages are required to use the plugin:
- tedge
You can check when the next time the benchmark will run by using the following systemd command:
systemctl status tedge-benchmark.timerOutput
● tedge-benchmark.timer - thin-edge.io benchmark runner
Loaded: loaded (/lib/systemd/system/tedge-benchmark.timer; enabled; preset: enabled)
Active: active (waiting) since Wed 2023-12-06 22:33:01 CET; 55min ago
Trigger: Thu 2023-12-07 00:00:00 CET; 31min left
Triggers: ● tedge-benchmark.service
Dec 06 22:33:01 rackfslot1 systemd[1]: Started tedge-benchmark.timer - thin-edge.io benchmark runner.You can manually trigger the benchmark to run on demand using the following command:
systemctl start tedge-benchmark.serviceOtherwise, you can also trigger the benchmark on the commands line.
tedge-benchmark.py run --count 1000 --beats 100 --period 500Check the results of the benchmark using:
tail -f /var/log/tedge-benchmark/tedge-benchmark.logSee the cli documentation for a print out of the usage.
The benchmark script is used to generate load on thin-edge.io by telemetry data on the thin-edge.io MQTT topic. The benchmark then checks to see if the telemetry data is mapped correctly to the Cumulocity outgoing topic to see if any messages are dropped.
The telemetry data creation can be controlled in the following ways,
- how many data points should be published in a burst (via
--beats <int>) - how long to wait between publishing a single data point (via
--beats-delay <milliseconds>) - how long to wait between bursts (from start of one burst to the start of another burst (via
--period <milliseconds>) - how many data points are to be published in the entire test (across all bursts) (via
--count <int>) - how many times to repeat all of the above (via
--iterations <int>)
The diagram aims at clarifying the terms listed above to better visualize which each of the parameters control:
