WireCellToolkit
Wire Cell Simulation, Signal Process and Reconstruction Toolki for Liquid Argon Detectors
WireCell::ExecMon Class Reference

#include <ExecMon.h>

Collaboration diagram for WireCell::ExecMon:

Public Member Functions

 ExecMon (const std::string &msg="start", TimeKeeper::ptime starting_time=boost::posix_time::microsec_clock::local_time())
 
 ~ExecMon ()
 
std::string operator() (std::string msg="<tick>", TimeKeeper::ptime now=boost::posix_time::microsec_clock::local_time(), MemUsage::memusage mu=MemUsage::memusage(-1,-1))
 Record an event. More...
 
std::string summary () const
 Return summary up to now. More...
 

Public Attributes

TimeKeeper tk
 
MemUsage mu
 

Detailed Description

A helper class combining a TimeKeeper and a MemUsage

Use like

ExecMon em("starting"); ... em("starting long calculation...."); do_long_calculation(); em("...done"); ... info(em.summary());

Definition at line 21 of file ExecMon.h.

Constructor & Destructor Documentation

◆ ExecMon()

ExecMon::ExecMon ( const std::string &  msg = "start",
TimeKeeper::ptime  starting_time = boost::posix_time::microsec_clock::local_time() 
)

Definition at line 6 of file ExecMon.cxx.

◆ ~ExecMon()

ExecMon::~ExecMon ( )

Definition at line 10 of file ExecMon.cxx.

Member Function Documentation

◆ operator()()

std::string ExecMon::operator() ( std::string  msg = "<tick>",
TimeKeeper::ptime  now = boost::posix_time::microsec_clock::local_time(),
MemUsage::memusage  mu = MemUsage::memusage(-1,-1) 
)

Record an event.

Definition at line 12 of file ExecMon.cxx.

◆ summary()

std::string ExecMon::summary ( ) const

Return summary up to now.

Definition at line 21 of file ExecMon.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mu

MemUsage WireCell::ExecMon::mu

Definition at line 38 of file ExecMon.h.

◆ tk

TimeKeeper WireCell::ExecMon::tk

Definition at line 37 of file ExecMon.h.


The documentation for this class was generated from the following files: