4 #pragma warning( disable : 654 ) 23 m_stat = serviceLocator()->service(
"ChronoStatSvc" );
25 error() <<
"Cannot get ChronoStatSvc" <<
endmsg;
39 double deltaVSize = 0.00001;
44 if ( pInfo.
vsize > 0 ) {
52 info() << msg <<
" " << caller <<
" " << evt <<
" \tvirtual size = " << pInfo.
vsize <<
" MB" 53 <<
" \tresident set size = " << pInfo.
rss <<
" MB" 54 <<
" deltaVsize = " << deltaVSize <<
" MB" <<
endmsg;
60 Stat sts(
statSvc(), caller +
":VMem", deltaVSize );
constexpr static const auto FAILURE
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Just a minor modification of MemoryAuditor to allow the output memory statistics table to be printed...
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Small wrapper class for easy manipulation with generic counters and IStatSvc interface.
#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
constexpr static const auto SUCCESS
static bool getProcInfo(procInfo &info)
Get the process informations.
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.