-
Notifications
You must be signed in to change notification settings - Fork 583
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
benchmarks/cyclictest: the rt-tests cyclictest NuttX Port #3000
Conversation
[Experimental Bot, please feedback here] This PR description, while a good start, doesn't fully meet the NuttX requirements. Here's a breakdown and suggestions for improvement: Missing/Insufficient Information:
Revised PR Description Example (incorporating the above suggestions):
No cyclictest utility found in NuttX$ cyclictest Using existing inadequate method (e.g., from benchmarks/rt-tests - provide a concrete example)... (output showing limitations in precision or functionality) ...
Using semaphore wait method$ cyclictest -p 90 -d 0 -n -h 0 -t 1 -i 200000 -l 1000 ... output showing consistent latency measurements ...Using timer device wait method$ cyclictest -p 90 -d 1 -n -h 0 -t 1 -i 200000 -l 1000 ... output showing consistent latency measurements ...
By providing this level of detail, you significantly increase the chances of your PR being accepted quickly. Remember to adapt this example to accurately reflect your specific changes and testing results. |
Nice work @zdebanos !!! Please submit also a Documentation/ to the NuttX repository show usages examples, expected results, how to spot issues using the cyclictest, etc. |
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.
Thank you @zdebanos great work! :-)
- Please resolve discussion with @xiaoxiang781216 :-)
- Please provide documentation :-)
Thank you very much for the review! I've been going through the code and there are still some bugs I did not think about. But as I have time, I'll prepare the documentation and fix some of those things so it is stable. |
Despite the existence of the patch in benchmarks/rt-tests, this commit adds the NuttX Official cyclictest utility. The main difference is the introduction of different waiting methods next to POSIX clock_nanosleep: - The thread can wait for a g_waitsem, posted by board_timerhook() if CONFIG_SYSTEMTICK_HOOK is defined. Since the semaphore is only one, only one thread can wait. - The thread can wait for a Timer Device to timeout. The timer's timeout determines the waiting time of the thread. Since the timer is only one, again, only one thread can wait. The user can measure the elapsed time using clock_gettime or the timer device itself. The different waiting and measuring methods were introduced because NuttX, by default, does not offer fine measuring capabilities using POSIX time functions (as of Feb 25). Signed-off-by: Stepan Pressl <[email protected]>
05c5c72
to
e7f44c6
Compare
I've managed to prepare the documentation for the cyclictest utility, I've created a pull request here. Concerning the semaphore systemtickhook discussion, I've decided to delete such measurement from this cyclictest, so I mark this as resolved @xiaoxiang781216. I actually did not think twice before implemententing such thing because I found out that measuring the latency would probably be too much of a hassle (in the However, I do not have time right now to do proper testing with the POSIX time functions, because it would require project reconfiguration to the tickless mode. The command
Tested on ATSAMV71Q21B 300 MHz, Cortex M7. The units are in us. |
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.
Thank you @zdebanos for the update and documentation!! :-)
I think this is a good starting point and for sure may be updated soon wit other options / switches / methods? What you you think @xiaoxiang781216 can we accept it in current form ?
@acassis you have merged PR with "changes requested" and unresolved discussion :-( :-( |
@cederom sorry, but I think he fixed it |
Despite the existence of the patch in benchmarks/rt-tests, this commit adds the NuttX Official cyclictest utility.
The main difference is the introduction of different waiting methods next to POSIX clock_nanosleep:
The user can measure the elapsed time using clock_gettime or the timer device itself. The different waiting and measuring methods were introduced because NuttX, by default, does not offer fine measuring capabilities using POSIX time functions (as of Feb 25).
Summary
Instead of a simple patch, NuttX now has an official
cyclictest
utility port. The new cyclictest was introduced due to limited fine measuring capabilities using POSIX time functions (clock_gettime
andclock_nanosleep
). Also this port adheres to the NuttX coding style.Impact
Might be used in CI/CD to test the RT capabilities of NuttX.
Testing
Locally on a custom ATSAMV7 board.