Update task monitor to support dynamically configuring table column width based on configured freertos max name length
Update task monitor to not show core id column if core id is not configured to be tracked as part of the task.
Motivation and Context
Right now the monitor is statically coded to always show (in the table output) 16 character width for the name, and a column for the core id. However, the task name could be shorter or longer (16 is the default configured freertos max task name length), and the core id support may not be compiled in (by default it is not).
This PR updates the table printing to not show core id column if it's not supported, and to update the name column width based on the configured max task name length.
How has this been tested?
Building and running the monitor/example on a QtPy ESP32s3.
Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Standard config (no core id, max task name length = 16):
Longer max name length and core id enabled:
Short name length:
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update
[ ] Hardware (schematic, board, system design) change
[x] Software change
Checklist:
[ ] My change requires a change to the documentation.
[ ] I have added / updated the documentation related to this change via either README or WIKI
Software
[ ] I have added tests to cover my changes.
[ ] I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
[x] All new and existing tests passed.
[x] My code follows the code style of this project.
Description
Motivation and Context
Right now the monitor is statically coded to always show (in the table output) 16 character width for the name, and a column for the core id. However, the task name could be shorter or longer (16 is the default configured freertos max task name length), and the core id support may not be compiled in (by default it is not).
This PR updates the table printing to not show core id column if it's not supported, and to update the name column width based on the configured max task name length.
How has this been tested?
Building and running the
monitor/example
on a QtPy ESP32s3.Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Standard config (no core id, max task name length = 16):
Longer max name length and core id enabled:
Short name length:
![CleanShot 2024-05-14 at 16 45 48](https://github.com/esp-cpp/espp/assets/213467/c7edc0bd-2057-4ac9-a585-90f1784dba7f)
Types of changes
Checklist:
Software
.github/workflows/build.yml
file to add my new test to the automated cloud build github action.