iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::SystemProfiler Class Reference

#include <nrt/Core/Debugging/SystemProfiler.H>

Simple system profiler (shared event logger)

This is a Singleton EventLog. See EventLog for the user interface. In this singleton, we hold simple bool variables which users should check for before they log an event. This relies on the user's honesty but is faster than doing such checks during the logging itself, thus:

// use some CPU cycles to build a nice log entry
}

Mostly, only people who "know what they are doing" (i.e., developers of the Blackboard system or of the Log functions, etc) should use SystemProfiler directly. The nrt::Manager exposes some command-line arguments which allow end users to turn different types of logging on or off.

Definition at line 61 of file SystemProfiler.H.

Inheritance diagram for nrt::SystemProfiler:
nrt::Singleton< SystemProfiler > nrt::EventLog

Public Member Functions

 SystemProfiler ()=default
 Constructor.
 
- Public Member Functions inherited from nrt::EventLog
void checkpoint (std::string const &msg)
 Log a point event (no duration)
 
void checkpoint (char const *msg)
 Log a point event (no duration), faster version for literal strings.
 
Event event (std::string const &msg)
 Start logging an extended event. More...
 
Event event (char const *msg)
 Start logging an extended event, faster version for literal strings.
 
void save (std::ostream &os) const
 Save entire log to a stream.
 
void summary (EventLogSummary &s) const
 Save a summary of the entire log.
 
void setOnlineOstream (std::ostream *os=nullptr)
 Set the ostream to use when logging online (i.e. writing each log entry as it is created) More...
 

Public Attributes

bool profileBlackboard = false
 Do we want to profile Blackboard operation?
 
bool profileLogMessages = false
 Do we want to profile NRT_INFO() and such log messages?
 

Additional Inherited Members

- Static Public Member Functions inherited from nrt::Singleton< SystemProfiler >
static SystemProfilerinstance ()
 Get the global, unique instance of the class T. More...
 
- Protected Member Functions inherited from nrt::Singleton< SystemProfiler >
 Singleton ()
 Only classes that inherit from Singleton can construct it via its protected default constructor.
 

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