4 # pragma warning( disable : 654 ) 22 m_stat = serviceLocator()->service(
"ChronoStatSvc" );
24 error() <<
"Cannot get ChronoStatSvc" <<
endmsg;
36 double deltaVSize = 0.00001;
41 if ( pInfo.
vsize > 0 ) {
47 info() <<
msg <<
" " << caller <<
" " <<
evt <<
" \tvirtual size = " << pInfo.
vsize <<
" MB" 48 <<
" \tresident set size = " << pInfo.
rss <<
" MB" 49 <<
" deltaVsize = " << deltaVSize <<
" MB" <<
endmsg;
55 Stat sts(
statSvc(), caller +
":VMem", deltaVSize );
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.
constexpr static const auto SUCCESS
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
#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
static bool getProcInfo(procInfo &info)
Get the process informations.
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
constexpr static const auto FAILURE
void i_before(CustomEventTypeRef evt, const std::string &caller) override
Re-implement i_before to avoid monitoring the memory usage before a function.
virtual StatusCode initialize()
SmartIF< IChronoStatSvc > & statSvc()
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
void i_printinfo(const std::string &msg, CustomEventTypeRef evt, const std::string &caller) override
Report the memory usage.