24 using CommonAuditor::CommonAuditor;
28 void i_before( CustomEventTypeRef
evt, std::string_view caller )
override;
34 virtual void i_printinfo( std::string_view
msg, CustomEventTypeRef
evt, std::string_view caller );
40 i_printinfo(
"Memory usage before",
evt, caller );
51 info() <<
msg <<
" " << caller <<
" " <<
evt <<
" virtual size = " << pInfo.vsize <<
" MB" 52 <<
" resident set size = " << pInfo.rss <<
" MB" <<
endmsg;
Base class with common functionalities shared by few auditor implementations.
static ProcStats * instance()
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
void i_before(CustomEventTypeRef evt, std::string_view caller) override
Default (catch-all) "before" Auditor hook.
#define DECLARE_COMPONENT(type)
virtual void i_printinfo(std::string_view msg, CustomEventTypeRef evt, std::string_view caller)
Report the memory usage.
This class is used for returning status codes from appropriate routines.
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Monitors the memory use of each algorithm.
bool fetch(procInfo &fill_me)
void i_after(CustomEventTypeRef evt, std::string_view caller, const StatusCode &sc) override
Default (catch-all) "after" Auditor hook.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.