-
Notifications
You must be signed in to change notification settings - Fork 37
feature(esp_tinyusb): TinyUSB task deletion notification driven (part 2/3) #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
31fd0b0 to
d14fb88
Compare
There was a problem hiding this 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 adds CPU load measurement capabilities to the TinyUSB test suite to ensure the task deletion notification-driven implementation doesn't introduce performance regressions. The test measures both runtime ticks and CPU load percentage during USB device enumeration.
Key Changes:
- Adds CPU load and runtime statistics measurement test for TinyUSB task
- Validates that TinyUSB task CPU load remains at 0% after enumeration
- Validates that TinyUSB runtime stays below 1800 ticks during enumeration
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| sdkconfig.defaults | Enables FreeRTOS trace facility and runtime stats for CPU load measurement |
| pytest_runtime_config.py | Adds pytest test case to verify CPU load metrics are within expected thresholds |
| test_cpu_load.c | Implements CPU load measurement logic using FreeRTOS runtime statistics |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
device/esp_tinyusb/test_apps/runtime_config/main/test_cpu_load.c
Outdated
Show resolved
Hide resolved
device/esp_tinyusb/test_apps/runtime_config/main/test_cpu_load.c
Outdated
Show resolved
Hide resolved
device/esp_tinyusb/test_apps/runtime_config/main/test_cpu_load.c
Outdated
Show resolved
Hide resolved
device/esp_tinyusb/test_apps/runtime_config/main/test_cpu_load.c
Outdated
Show resolved
Hide resolved
device/esp_tinyusb/test_apps/runtime_config/main/test_cpu_load.c
Outdated
Show resolved
Hide resolved
d14fb88 to
1619f26
Compare
|
Hi @tore-espressif This one is also ready, PTAL after the part 1. |
device/esp_tinyusb/test_apps/runtime_config/main/test_cpu_load.c
Outdated
Show resolved
Hide resolved
aed6a02 to
6ec9db1
Compare
1619f26 to
019c18f
Compare
device/esp_tinyusb/test_apps/runtime_config/main/test_cpu_load.c
Outdated
Show resolved
Hide resolved
peter-marcisovsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, no other comments.
6ec9db1 to
0c6cf9e
Compare
|
Converted to draft to apply Peter's notes and resolve conflicts. |
019c18f to
fd54244
Compare
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on December 20. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
0c6cf9e to
5ac149b
Compare
fd54244 to
adc2129
Compare
6dca07a to
eae16ec
Compare
eae16ec to
e3b601d
Compare
|
Hi This one is ready again, PTAL. |
Description
This is the second part of the plan: Add a test application for CPU load
The test case has been added to the runtime_config, which is the future will be used as a general
esp_tinyusbdevice test.Measuring values:
< 1800== 0(as most of the time CPU spend inIDLE0andIDLE1tasks)Limitations
CPU Load is calculated based on the Run time value for the task. Precision of the current calculation is not enough to show the real CPU Load in percentage in our case (as it is less than 1%).
In the current PR we measure the Run Time value and expect it to be in the interval:
Related
Testing
[CPU load] Install & Uninstall, default configuration", "[cpu_load]with pytest scenarioChecklist
Before submitting a Pull Request, please ensure the following: