diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-09-22 09:30:28 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-09-22 21:19:19 +1000 |
| commit | 022c222e858665054ca5cded512ae085da7939d0 (patch) | |
| tree | c4828bfd9ec837d747cf1ab5278d40f1e2d25a7c /src/app_console | |
| parent | 59e0de1fe268a580a49ffc0f91c83fdd88de385e (diff) | |
| download | tangara-fw-022c222e858665054ca5cded512ae085da7939d0.tar.gz | |
Add heap stats to the task stats output
Diffstat (limited to 'src/app_console')
| -rw-r--r-- | src/app_console/app_console.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/app_console/app_console.cpp b/src/app_console/app_console.cpp index 2d287e5d..55b51690 100644 --- a/src/app_console/app_console.cpp +++ b/src/app_console/app_console.cpp @@ -26,6 +26,7 @@ #include "esp_console.h" #include "esp_intr_alloc.h" #include "esp_log.h" +#include "esp_system.h" #include "event_queue.hpp" #include "ff.h" #include "freertos/FreeRTOSConfig_arch.h" @@ -427,6 +428,11 @@ int CmdTaskStats(int argc, char** argv) { delete[] start_status; delete[] end_status; + std::cout << "heap stats:" << std::endl; + std::cout << (esp_get_free_heap_size() / 1024) << " KiB free" << std::endl; + std::cout << (esp_get_minimum_free_heap_size() / 1024) + << " KiB free at lowest" << std::endl; + return 0; } |
