xorp

Profile Class Reference

Support for profiling XORP. More...

#include <profile.hh>

List of all members.

Classes

class  ProfileState

Public Types

typedef list< ProfileLogEntrylogentries
typedef map< string, ref_ptr
< ProfileState > > 
profiles

Public Member Functions

void create (const string &pname, const string &comment="") throw (PVariableExists)
 Create a new profile variable.
bool enabled (const string &pname) throw (PVariableUnknown)
 Test for this profile variable being enabled.
void log (const string &pname, string comment) throw (PVariableUnknown,PVariableNotEnabled)
 Add an entry to the profile log.
void enable (const string &pname) throw (PVariableUnknown,PVariableLocked)
 Enable tracing.
void disable (const string &pname) throw (PVariableUnknown)
 Disable tracing.
void lock_log (const string &pname) throw (PVariableUnknown,PVariableLocked)
 Lock the log in preparation for reading log entries.
bool read_log (const string &pname, ProfileLogEntry &entry) throw (PVariableUnknown,PVariableNotLocked)
 Read the next log entry;.
void release_log (const string &pname) throw (PVariableUnknown,PVariableNotLocked)
 Release the log.
void clear (const string &pname) throw (PVariableUnknown,PVariableLocked)
 Clear the profiledata.
string get_list () const

Private Attributes

int _profile_cnt
profiles _profiles

Detailed Description

Support for profiling XORP.

Save the time that an event occured for later retrieval.


Member Function Documentation

void Profile::disable ( const string &  pname) throw (PVariableUnknown)

Disable tracing.

Parameters:
profilevariable.
void Profile::enable ( const string &  pname) throw (PVariableUnknown,PVariableLocked)

Enable tracing.

Parameters:
profilevariable.
bool Profile::enabled ( const string &  pname) throw (PVariableUnknown) [inline]

Test for this profile variable being enabled.

Returns:
true if this profile is enabled.
string Profile::get_list ( ) const
Returns:
A newline separated list of profiling variables along with the associated comments.
bool Profile::read_log ( const string &  pname,
ProfileLogEntry entry 
) throw (PVariableUnknown,PVariableNotLocked)

Read the next log entry;.

Parameters:
pname
entrylog entry
Returns:
True a entry has been returned.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations