-
Notifications
You must be signed in to change notification settings - Fork 27
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
add rational why ament_index pkgs don't have explicit performance tests #65
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -121,7 +121,13 @@ A description of how coverage statistics are summarized from this page, can be f | |||||
|
||||||
### Performance [4.iv] | ||||||
|
||||||
`ament_index_cpp` does not conduct performance tests. | ||||||
An environment variable defines the prefix paths of such resource indices and the API has a time complexity of `O(n)` where `n` is the number of prefix paths. | ||||||
The time complexity to query information is either scaling linearly with the number of resource types or with the number of resources per type (depending on which dimension is requested). | ||||||
If the content of a specific resource is retrieved the time complexity is linear to the size of the content as is the memory usage in that case since the content is returned to the caller. | ||||||
The performance of the implementation is defined by the performance of the underlying filesystem functions and the implemented logic doesn't add any significant overhead. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dirk-thomas meta: while I agree the logic overhead is likely negligible compared to that of IO, the performance of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is why I tried to describe the complexity of the different kind of queries available. Arguably if there would be a more efficient way the resource index could be structured to make queries more efficient (which still satisfies the requirements) that might be something better discussed on the design document (https://github.com/ament/ament_cmake/blob/master/ament_cmake_core/doc/resource_index.md). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sure, my point being that to say There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you elaborate why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-reading this thread, I get the impression that we're using the term
Suggested change
would constrain interpretation. WDYT? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good to me - applied in both locations in d0dbd70. |
||||||
|
||||||
From a usage point of view it is also expected that the resource index is commonly only queried during startup and not at runtime of a production system. | ||||||
Therefore `ament_index_cpp` does not conduct explicit performance tests. | ||||||
|
||||||
### Linters and Static Analysis [4.v] | ||||||
|
||||||
|
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.
@dirk-thomas meta: one could argue that we should have tests that backup that claim.
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.
How would you create a test to actually do that? What kind of thresholds would you use?
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.
I'd probably benchmark queries with increasing values of
n
and check if the result of a linear regression reasonably (within one or two standard deviations) explains the measurements. We would need a big index to see through OS noise though, I give you that.And actually, now that I think about it, perhaps that's the only kind of performance test that would make sense here.
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.
Measuring enough different N trying to figure out if the complexity is linear as promised would be possible. (Even though this sounds extremely costly to me.)