-
Notifications
You must be signed in to change notification settings - Fork 48
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
Added benchmark test to rmw_implementation #127
Conversation
Signed-off-by: ahcorde <ahcorde@gmail.com>
cd49491
to
e0dcadf
Compare
Signed-off-by: ahcorde <ahcorde@gmail.com>
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.
This is really good - I like that it runs for each of the RMWs. Would you mind renaming it to rmw_init
since it's testing a lot more than just the prefetch function?
There is one big caveat here: library loading is only happening for the first call to rmw_init
. For example, if one of the RMW libraries has a massive amount of shared libraries linked to it, we'll only pay the price of loading them all once, and then each iteration after that won't need to do it again. After looking at the implementation, I don't think we want to expose the additional API on rmw_implementation
that would allow us to explicitly unload the library during each timing iteration, so these results will always be a best-case scenario.
Working off from this PR and also #135, I was able to confirm that forcing the library load causes the rmw_init
duration to increase by around 20%, so I think that's something we'll want to track.
I'm really not sure why rmw_implementation
has a separate package for tests, but if it's possible to move these tests into the rmw_implementation
package itself, we can add some purpose-built functions to care of unloading.
test_rmw_implementation/benchmark/benchmark_prefetch_symbols.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: ahcorde <ahcorde@gmail.com>
…mw_implementation
Signed-off-by: ahcorde <ahcorde@gmail.com>
@cottsay, moved benchmark test to |
Signed-off-by: Scott K Logan <logans@cottsay.net>
This can be used to test the loading sequence for each RMW. I can already see that there is some investigation to do for Cyclone DDS. Signed-off-by: Scott K Logan <logans@cottsay.net>
Co-authored-by: Scott K Logan <logans@cottsay.net> Signed-off-by: Scott K Logan <logans@cottsay.net> Signed-off-by: ahcorde <ahcorde@gmail.com>
Co-authored-by: Scott K Logan <logans@cottsay.net> Signed-off-by: Scott K Logan <logans@cottsay.net> Signed-off-by: ahcorde <ahcorde@gmail.com>
Most of the content here builds on rcpputils' shared library code and doesn't add any complexity worth testing. However, the preload operation lists quite a lot of symbols, and we should track the performance of that operation.
I tested
rmw_init()
which is in charge of fetch the initial symbolsSigned-off-by: ahcorde ahcorde@gmail.com