Support for profiling XORP. Save the time that an event occured for later retrieval.
typedef list<ProfileLogEntry> logentries | logentries |
ProfileState (class) | ProfileState |
typedef map<string, ref_ptr<ProfileState> > profiles | profiles |
Profile ()
| Profile |
~Profile ()
| ~Profile |
void create (const string& pname, const string& comment = "")
throw(PVariableExists) | create |
Create a new profile variable.
inline
bool
enabled (const string& pname)
throw(PVariableUnknown) | enabled |
Test for this profile variable being enabled.
Returns: true if this profile is enabled.
void log (const string& pname, string comment)
throw(PVariableUnknown,PVariableNotEnabled) | log |
Add an entry to the profile log.
void enable (const string& pname)
throw(PVariableUnknown,PVariableLocked) | enable |
Enable tracing.
Parameters:
profile | variable. |
void disable (const string& pname)
throw(PVariableUnknown) | disable |
Disable tracing.
Parameters:
profile | variable. |
void lock_log (const string& pname)
throw(PVariableUnknown,PVariableLocked) | lock_log |
Lock the log in preparation for reading log entries.
bool read_log (const string& pname, ProfileLogEntry& entry)
throw(PVariableUnknown,PVariableNotLocked) | read_log |
Read the next log entry;
Parameters:
entry | log entry |
Returns: True a entry has been returned.
void release_log (const string& pname)
throw(PVariableUnknown,PVariableNotLocked) | release_log |
void clear (const string& pname)
throw(PVariableUnknown,PVariableLocked) | clear |
string list ()
| list |
[const]
Returns: A newline separated list of profiling variables along with the associated comments.