Ipopt::TimedTask Class Reference

This class is used to collect timing information for a particular task. More...

#include <IpTimedTask.hpp>

List of all members.

Public Member Functions

void Reset ()
 Method for resetting time to zero.
void Start ()
 Method that is called before execution of the task.
void End ()
 Method that is called after execution of the task.
void EndIfStarted ()
 Method that is called after execution of the task for which timing might have been started.
Number TotalCpuTime () const
 Method returning total CPU time spend for task so far.
Number TotalSysTime () const
 Method returning total system time spend for task so far.
Number TotalWallclockTime () const
 Method returning total wall clock time spend for task so far.
Constructors/Destructors
 TimedTask ()
 Default constructor.
 ~TimedTask ()
 Default destructor.

Private Member Functions

Default Compiler Generated Methods (Hidden to avoid
implicit creation/calling). These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.

 TimedTask (const TimedTask &)
 Copy Constructor.
void operator= (const TimedTask &)
 Overloaded Equals Operator.

Private Attributes

Number start_cputime_
 CPU time at beginning of task.
Number total_cputime_
 Total CPU time for task measured so far.
Number start_systime_
 System time at beginning of task.
Number total_systime_
 Total system time for task measured so far.
Number start_walltime_
 Wall clock time at beginning of task.
Number total_walltime_
 Total wall clock time for task measured so far.
fields for debugging
bool start_called_
bool end_called_


Detailed Description

This class is used to collect timing information for a particular task.

Definition at line 18 of file IpTimedTask.hpp.


Constructor & Destructor Documentation

Ipopt::TimedTask::TimedTask (  )  [inline]

Default constructor.

Definition at line 24 of file IpTimedTask.hpp.

Ipopt::TimedTask::~TimedTask (  )  [inline]

Default destructor.

Definition at line 34 of file IpTimedTask.hpp.

Ipopt::TimedTask::TimedTask ( const TimedTask  )  [private]

Copy Constructor.


Member Function Documentation

void Ipopt::TimedTask::Reset (  )  [inline]

Method for resetting time to zero.

Definition at line 39 of file IpTimedTask.hpp.

References end_called_, start_called_, total_cputime_, total_systime_, and total_walltime_.

void Ipopt::TimedTask::Start (  )  [inline]

Method that is called before execution of the task.

Definition at line 49 of file IpTimedTask.hpp.

References Ipopt::CpuTime(), DBG_ASSERT, end_called_, start_called_, start_cputime_, start_systime_, start_walltime_, Ipopt::SysTime(), and Ipopt::WallclockTime().

void Ipopt::TimedTask::End (  )  [inline]

Method that is called after execution of the task.

Definition at line 61 of file IpTimedTask.hpp.

References Ipopt::CpuTime(), DBG_ASSERT, end_called_, start_called_, start_cputime_, start_systime_, start_walltime_, Ipopt::SysTime(), total_cputime_, total_systime_, total_walltime_, and Ipopt::WallclockTime().

void Ipopt::TimedTask::EndIfStarted (  )  [inline]

Method that is called after execution of the task for which timing might have been started.

This only updates the timing if the timing has indeed been conducted. This is useful to stop timing after catching exceptions.

Definition at line 76 of file IpTimedTask.hpp.

References Ipopt::CpuTime(), DBG_ASSERT, end_called_, start_called_, start_cputime_, start_systime_, start_walltime_, Ipopt::SysTime(), total_cputime_, total_systime_, total_walltime_, and Ipopt::WallclockTime().

Number Ipopt::TimedTask::TotalCpuTime (  )  const [inline]

Method returning total CPU time spend for task so far.

Definition at line 89 of file IpTimedTask.hpp.

References DBG_ASSERT, end_called_, and total_cputime_.

Number Ipopt::TimedTask::TotalSysTime (  )  const [inline]

Method returning total system time spend for task so far.

Definition at line 96 of file IpTimedTask.hpp.

References DBG_ASSERT, end_called_, and total_systime_.

Number Ipopt::TimedTask::TotalWallclockTime (  )  const [inline]

Method returning total wall clock time spend for task so far.

Definition at line 103 of file IpTimedTask.hpp.

References DBG_ASSERT, end_called_, and total_walltime_.

void Ipopt::TimedTask::operator= ( const TimedTask  )  [private]

Overloaded Equals Operator.


Member Data Documentation

Number Ipopt::TimedTask::start_cputime_ [private]

CPU time at beginning of task.

Definition at line 125 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), and Start().

Number Ipopt::TimedTask::total_cputime_ [private]

Total CPU time for task measured so far.

Definition at line 127 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), Reset(), and TotalCpuTime().

Number Ipopt::TimedTask::start_systime_ [private]

System time at beginning of task.

Definition at line 129 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), and Start().

Number Ipopt::TimedTask::total_systime_ [private]

Total system time for task measured so far.

Definition at line 131 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), Reset(), and TotalSysTime().

Number Ipopt::TimedTask::start_walltime_ [private]

Wall clock time at beginning of task.

Definition at line 133 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), and Start().

Number Ipopt::TimedTask::total_walltime_ [private]

Total wall clock time for task measured so far.

Definition at line 135 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), Reset(), and TotalWallclockTime().

bool Ipopt::TimedTask::start_called_ [private]

Definition at line 139 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), Reset(), and Start().

bool Ipopt::TimedTask::end_called_ [private]

Definition at line 140 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), Reset(), Start(), TotalCpuTime(), TotalSysTime(), and TotalWallclockTime().


The documentation for this class was generated from the following file:
Generated on Sat Nov 6 03:13:34 2010 by  doxygen 1.4.7