v1.6.5: Improve performance and memory usage

This commit is contained in:
Terrence
2025-05-26 14:30:44 +08:00
parent 277f87ae5f
commit 0c57df1cd8
13 changed files with 50 additions and 45 deletions

View File

@@ -47,7 +47,7 @@ std::string SystemInfo::GetChipModelName() {
return std::string(CONFIG_IDF_TARGET);
}
esp_err_t SystemInfo::PrintRealTimeStats(TickType_t xTicksToWait) {
esp_err_t SystemInfo::PrintTaskCpuUsage(TickType_t xTicksToWait) {
#define ARRAY_SIZE_OFFSET 5
TaskStatus_t *start_array = NULL, *end_array = NULL;
UBaseType_t start_array_size, end_array_size;
@@ -132,3 +132,14 @@ exit: //Common return path
return ret;
}
void SystemInfo::PrintTaskList() {
char buffer[500];
vTaskList(buffer);
ESP_LOGI(TAG, "Task list: \n%s", buffer);
}
void SystemInfo::PrintHeapStats() {
int free_sram = heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
int min_free_sram = heap_caps_get_minimum_free_size(MALLOC_CAP_INTERNAL);
ESP_LOGI(TAG, "free sram: %u minimal sram: %u", free_sram, min_free_sram);
}