ESP32 performance measurements

marcovr
Posts: 1
Joined: Mon Oct 28, 2019 11:04 am

ESP32 performance measurements

Postby marcovr » Wed Oct 30, 2019 1:09 pm

I'd like to get some performance-related metrics for an application running on the ESP32 and I'm looking for suggestions on how to do so.

I'm interested in metrics such as:
  • Memory usage over time
  • Maximum memory usage
  • Time to complete a task
  • Maybe the cycle count to complete a task?
Ideally I would like to get these metrics without modifying the code of the application. I'm thinking about having a sort of wrapper which would take the measurements and somehow launch the application. Is that possible?

For context, this would be used to evaluate and compare the performance of different versions of the application.

Measuring the elapsed time is probably not that difficult, since there is e.g. esp_timer_get_time(), but how about the memory usage?
I've seen this post, which gave me the idea to have a separate process which repeatedly querys the free RAM. is there a better solution? Also, ESP.getFreeHeap() seems to be Arduino-specific, is that equivalent to heap_caps_get_free_size()?

Thanks for your suggestions!

Who is online

Users browsing this forum: No registered users and 71 guests