30 using Auditor::Auditor;
39 i_printinfo(
"Memory usage has changed after", evt, caller );
43 void i_printinfo( std::string_view
msg, std::string
const& evt, std::string_view caller );
53 return Auditor::initialize().andThen( [&]() ->
StatusCode {
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;
83 Stat sts(
m_stat, std::string{ caller }.append(
":VMem" ), deltaVSize );
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
This class represents an entry point to all the event specific data.
Base class from which all concrete auditor classes should be derived.
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Just a minor modification of MemoryAuditor to allow the output memory statistics table to be printed.
void i_printinfo(std::string_view msg, std::string const &evt, std::string_view caller)
void before(std::string const &, std::string const &, EventContext const &) override
double m_vSize
vsize of the previous call to printinfo
SmartIF< IChronoStatSvc > m_stat
StatusCode initialize() override
void after(std::string const &evt, std::string const &caller, EventContext const &, const StatusCode &) override
bool fetch(procInfo &fill_me)
static ProcStats * instance()
Small smart pointer class with automatic reference counting for IInterface.
Small wrapper class for easy manipulation with generic counters and IStatSvc interface.
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE