30 using CommonAuditor::CommonAuditor;
34 void i_before( CustomEventTypeRef , std::string_view )
override {
43 void i_printinfo( std::string_view
msg, CustomEventTypeRef
evt, std::string_view caller );
54 m_stat = serviceLocator()->service(
"ChronoStatSvc" );
56 error() <<
"Cannot get ChronoStatSvc" <<
endmsg;
65 double deltaVSize = 0.00001;
69 if ( pInfo.vsize > 0 ) {
75 info() <<
msg <<
" " << caller <<
" " <<
evt <<
" \tvirtual size = " << pInfo.vsize <<
" MB" 76 <<
" \tresident set size = " << pInfo.rss <<
" MB" 77 <<
" deltaVsize = " << deltaVSize <<
" MB" <<
endmsg;
Just a minor modification of MemoryAuditor to allow the output memory statistics table to be printed.
Small wrapper class for easy manipulation with generic counters and IStatSvc interface.
Base class with common functionalities shared by few auditor implementations.
static ProcStats * instance()
constexpr static const auto SUCCESS
StatusCode initialize() override
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
#define DECLARE_COMPONENT(type)
This class is used for returning status codes from appropriate routines.
double m_vSize
vsize of the previous call to printinfo
SmartIF< IChronoStatSvc > m_stat
void i_after(CustomEventTypeRef evt, std::string_view caller, const StatusCode &) override
catch all "after" method, implemented in the derived class
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
constexpr static const auto FAILURE
virtual StatusCode initialize()
void i_printinfo(std::string_view msg, CustomEventTypeRef evt, std::string_view caller)
bool fetch(procInfo &fill_me)
void i_before(CustomEventTypeRef, std::string_view) override
catch all "before" method, implemented in the derived class
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.