va3wam / TWIPe

This repository contains the embedded code used for the TWIPe robot
MIT License
2 stars 0 forks source link

Measure execution time of routines & CPU utilization #73

Open va3wam opened 3 years ago

va3wam commented 3 years ago

Track how long each routine out of loop() takes to run. Also track over-all loop() time. Count whenever the total execution time exceeds the tmrIMU setting. Also send a health alert to the MQTT broker.

nerdoug commented 3 years ago

I think this is worth doing, at a low priority, as it is valuable information of the software feature capacity, and for troubleshooting performance problems. If I don't get something useful working before end of year, we can close it again.

nerdoug commented 3 years ago

Rough CPU percentage utilization is now displayed in right eye for the major routines called in loop(). Still need to be able to send this info out via MQTT, probably as an "event" message, with timing determined by the MQTT command that starts the reporting