tests: latency_measure: Remove TICK_SYNCH() #67856
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It has been observed that on some simulator platforms the TICK_SYNCH at the start of the ISR tests was acting as a bottle neck and leading the test to take an absurdly long time to execute. Removing this TICK_SYNCH() (which is a call to k_sleep(1 tick)) greatly speeds up the execution of this test on those platforms.
The ISR tests began with a call to TICK_SYNCH() which aligned the execution to the next tick boundary. The original aim of this was to prevent a rogue timer ISR from coming and interfering with the measurements. This used to be necessary as once upon a time that test only did a single iteration. However, it has since been updated to perform this measurement 10000 times. Consequently, should a rogue ISR be included in the measurement, it will be averaged out.
For example, if a rogue ISR of say 10 usec were to be included in a single measurement, its impact would be averaged down to 1 nsec, and that seems well within any expected experimental error.