Skip to content

thin-edge/tedge-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tedge-benchmark

Plugin summary

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) -

How to do I get it?

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) Latest version of 'tedge-benchmark' @ Cloudsmith
Alpine Linux (apk) Latest version of 'tedge-benchmark' @ Cloudsmith
RHEL/CentOS/Fedora (rpm) Latest version of 'tedge-benchmark' @ Cloudsmith

What will be deployed to the device?

  • The following service will be installed
    • tedge-benchmark (service and timer) (triggered every hour on the hour)
    • tedge-benchmark.py script which is called from the service, however it can also be called manually for adhoc usage

Plugin Dependencies

The following packages are required to use the plugin:

  • tedge

Check the timer status

You can check when the next time the benchmark will run by using the following systemd command:

systemctl status tedge-benchmark.timer

Output

● 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.

Triggering the benchmark on demand

You can manually trigger the benchmark to run on demand using the following command:

systemctl start tedge-benchmark.service

Otherwise, you can also trigger the benchmark on the commands line.

tedge-benchmark.py run --count 1000 --beats 100 --period 500

Check benchmark output

Check the results of the benchmark using:

tail -f /var/log/tedge-benchmark/tedge-benchmark.log

About the benchmark script itself

See 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:

tedge-benchmark.drawio.png

About

thin-edge.io benchmark script (not intended for public consumption just yet)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published