-
Notifications
You must be signed in to change notification settings - Fork 189
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 an observer for tracking the size of DataBox items #5858
Conversation
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.
A few minor things and some optionals in question form. Let me know what you think, please squash directly :)
auto& observer_writer_proxy = Parallel::get_parallel_component< | ||
observers::ObserverWriter<Metavariables>>(cache); | ||
const std::string subfile_name = | ||
"/ObserveDataBox/" + pretty_type::name<ContributingComponent>(); |
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.
Should we make this file name be specified in ObserveDataBox
like we do for other observations? Maybe otherwise name this ObserveDataBoxSizeInMb
? Long, but extremely unlikely to conflict with anything
}; | ||
} // namespace detail | ||
|
||
class ObserveDataBox : public Event { |
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.
Could you add some doxygen comment so this shows up?
How difficult would it be to write a simple test that just verifies this works with say 1 singleton, 1 nodegroup, and 1 array (with 3 elements?)? If it's difficult, I'm happy to defer since this feature is very necessary
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.
the fixup LGTM. Please squash!
- Adds a function to observe the size in bytes of all non-reference items in a DataBox - Adds an observer to gather the sizes in MB of each item (summed over all elements) for the DataBoxes of each component
Proposed changes
This adds an event that can be used to track the sizes of DataBox items. It is not added to any executable, as it seems to add some compilation time. To use it, add it as an Event similar to the MonitorMemory event.
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments