46 #ifndef MUELU_MONITOR_HPP 47 #define MUELU_MONITOR_HPP 52 #include "Teuchos_FancyOStream.hpp" 53 #include "Teuchos_RCPDecl.hpp" 54 #include "Teuchos_RCP.hpp" 55 #include "Teuchos_Utils.hpp" 77 object_.getOStream()->pushTab();
115 : printMonitor_(object, msg +
" (" + object.
description() +
")", msgLevel),
116 timerMonitor_(object, object.
ShortClassName() +
": " + msg +
" (total)", timerLevel)
154 : printMonitor_(object, msg, msgLevel),
155 timerMonitor_(object, object.
ShortClassName() +
": " + msg +
" (sub, total)", timerLevel)
164 #ifdef HAVE_MUELU_PROFILING 165 #define MUELU_TIMER_AS_STRING static_cast<std::ostringstream*>( &(std::ostringstream() << " " << timerIdentifier_++) )->str() 167 #define MUELU_TIMER_AS_STRING 205 :
Monitor(object, msg, msgLevel, timerLevel),
206 timerMonitorExclusive_(object, object.
ShortClassName() +
": " + msg, timerLevel)
227 :
Monitor(object, msg, msgLevel, timerLevel),
228 timerMonitorExclusive_(object, object.
ShortClassName() +
": " + msg, timerLevel)
275 :
SubMonitor(object, msg, msgLevel, timerLevel)
291 :
SubMonitor(object, msg, msgLevel, timerLevel)
304 #endif // MUELU_MONITOR_HPP RCP< TimeMonitor > levelTimeMonitor_
Total time spent on this level in this object and all children.
High level timing information (use Teuchos::TimeMonitor::summarize() to print)
std::string toString(const T &what)
Little helper function to convert non-string types to strings.
Timer to be used in factories. Similar to Monitor but with additional timers.
Timer to be used in non-factories. Similar to Monitor, but doesn't print object description.
One-liner description of what is happening.
Namespace for MueLu classes and methods.
MutuallyExclusiveTimeMonitor< FactoryBase > timerMonitorExclusive_
Total time spent on all levels in this object only, excluding all children.
Integrates Teuchos::TimeMonitor with MueLu verbosity system.
Print skeleton for the run, i.e. factory calls and used parameters.
virtual std::string ShortClassName() const
Return the class name of the object, without template parameters and without namespace.
SubFactoryMonitor(const BaseClass &object, const std::string &msg, const Level &level, MsgType msgLevel=Runtime1, MsgType timerLevel=Timings1)
Constructor.
Monitor(const BaseClass &object, const std::string &msg, MsgType msgLevel=Runtime0, MsgType timerLevel=Timings0)
Constructor.
Class that holds all level-specific information.
RCP< TimeMonitor > levelTimeMonitor_
Total time spent on this level in this object and all its children.
#define MUELU_TIMER_AS_STRING
FactoryMonitor(const BaseClass &object, const std::string &msg, int levelID, MsgType msgLevel=static_cast< MsgType >(Test|Runtime0), MsgType timerLevel=Timings0)
Constructor.
Detailed timing information (use Teuchos::TimeMonitor::summarize() to print)
Timer to be used in factories. Similar to SubMonitor but adds a timer level by level.
Similar to TimeMonitor, but uses MutuallyExclusiveTime objects.
PrintMonitor(const BaseClass &object, const std::string &msg, MsgType msgLevel=Runtime0)
Constructor.
FactoryMonitor(const BaseClass &object, const std::string &msg, const Level &level, MsgType msgLevel=static_cast< MsgType >(Test|Runtime0), MsgType timerLevel=Timings0)
Constructor.
TimeMonitor timerMonitor_
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
bool IsPrint(MsgType type, int thisProcRankOnly=-1) const
Find out whether we need to print out information for a specific message type.
Base class for MueLu classes.
Record timing information level by level. Must be used in combinaison with Timings0/Timings1.
SubFactoryMonitor(const BaseClass &object, const std::string &msg, int levelID, MsgType msgLevel=Runtime1, MsgType timerLevel=Timings1)
Constructor.
Timer to be used in non-factories.
RCP< MutuallyExclusiveTimeMonitor< Level > > levelTimeMonitorExclusive_
Total time spent on this level in this object only, excluding all children.
static int timerIdentifier_
int GetLevelID() const
Return level number.
PrintMonitor printMonitor_
Manages printing.
Description of what is happening (more verbose)
const BaseClass & object_
TimeMonitor timerMonitor_
Records total time spent in this object and all its children, over all levels.
PrintMonitor printMonitor_
virtual std::string description() const
Return a simple one-line description of this object.
SubMonitor(const BaseClass &object, const std::string &msg, MsgType msgLevel=Runtime1, MsgType timerLevel=Timings1)
Constructor.