Skip to content

feat(monitor): Add HeapMonitor class to monitor component#435

Merged
finger563 merged 7 commits intomainfrom
feat/heap-monitor
May 14, 2025
Merged

feat(monitor): Add HeapMonitor class to monitor component#435
finger563 merged 7 commits intomainfrom
feat/heap-monitor

Conversation

@finger563
Copy link
Contributor

@finger563 finger563 commented May 14, 2025

Description

  • Add HeapMonitor class to monitor component
  • Update monitor/example to test the HeapMonitor APIs

Motivation and Context

In addition to tracking task memory / utilization (which the monitor component currently does), it is frequently useful to track system memory utilization in various memory regions (e.g. DRAM, SPIRAM, and DMA memories). This PR adds functionality to simplify and make more consistent code which does that.

How has this been tested?

Build and run monitor/example on QtPy ESP32s3

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2025-05-14 at 12 05 19

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • 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
  • 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.
  • All new and existing tests passed.
  • My code follows the code style of this project.

@finger563 finger563 self-assigned this May 14, 2025
@finger563 finger563 requested a review from Copilot May 14, 2025 17:18
@finger563 finger563 added enhancement New feature or request monitor labels May 14, 2025
@github-actions
Copy link

github-actions bot commented May 14, 2025

✅Static analysis result - no issues found! ✅

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new HeapMonitor class to the monitor component to extend memory monitoring capabilities and update associated documentation and examples.

  • Added HeapMonitor class with methods for retrieving and formatting heap info.
  • Updated documentation and Doxygen configuration to reflect the new component.
  • Expanded the monitor example to demonstrate HeapMonitor usage.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
doc/en/monitor.rst Added new section with documentation for Heap Monitor.
doc/Doxyfile Updated Doxyfile to include heap_monitor.hpp in documentation.
components/monitor/src/heap_monitor.cpp Implemented HeapMonitor methods for retrieving and formatting heap info.
components/monitor/include/heap_monitor.hpp Declared HeapMonitor class and its API along with fmt::formatter specialization.
components/monitor/example/main/monitor_example.cpp Extended example to demonstrate HeapMonitor usage.
components/monitor/CMakeLists.txt Included source directory for the new HeapMonitor implementation.

@finger563 finger563 merged commit 54a412b into main May 14, 2025
78 checks passed
@finger563 finger563 deleted the feat/heap-monitor branch May 14, 2025 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request monitor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants