System::ProcessTime Class Reference

Simple class to hold the time information of a process. More...

#include </tmp/marcocle/lhcb-release/1122/GAUDI/GAUDI_v27r0/InstallArea/x86_64-slc6-gcc49-opt/include/GaudiKernel/Timing.h>

Public Types

typedef long long TimeValueType
 
typedef long long TimeValueType
 

Public Member Functions

 ProcessTime ()
 Constructor. More...
 
 ProcessTime (TimeValueType k, TimeValueType u, TimeValueType e)
 Constructor. More...
 
template<TimeType T>
TimeValueType kernelTime () const
 Retrieve the kernel time in the requested unit. More...
 
template<TimeType T>
TimeValueType userTime () const
 Retrieve the user time in the requested unit. More...
 
template<TimeType T>
TimeValueType elapsedTime () const
 Retrieve the elapsed time in the requested unit. More...
 
template<TimeType T>
TimeValueType cpuTime () const
 Retrieve the CPU (user+kernel) time in the requested unit. More...
 
ProcessTime operator- (const ProcessTime &rhs) const
 Return the delta between two ProcessTime objects. More...
 
ProcessTimeoperator+= (const ProcessTime &rhs)
 Add the timings to the current objects. More...
 
 ProcessTime ()
 Constructor. More...
 
 ProcessTime (TimeValueType k, TimeValueType u, TimeValueType e)
 Constructor. More...
 
template<TimeType T>
TimeValueType kernelTime () const
 Retrieve the kernel time in the requested unit. More...
 
template<TimeType T>
TimeValueType userTime () const
 Retrieve the user time in the requested unit. More...
 
template<TimeType T>
TimeValueType elapsedTime () const
 Retrieve the elapsed time in the requested unit. More...
 
template<TimeType T>
TimeValueType cpuTime () const
 Retrieve the CPU (user+kernel) time in the requested unit. More...
 
ProcessTime operator- (const ProcessTime &rhs) const
 Return the delta between two ProcessTime objects. More...
 
ProcessTimeoperator+= (const ProcessTime &rhs)
 Add the timings to the current objects. More...
 

Private Attributes

TimeValueType i_kernel
 Internal storage. More...
 
TimeValueType i_user
 
TimeValueType i_elapsed
 

Detailed Description

Simple class to hold the time information of a process.

Simplify the simultaneous handling of kernel, user and elapsed times of a process.

See also
{bug #87341}

Definition at line 133 of file Timing.h.

Member Typedef Documentation

Definition at line 135 of file Timing.h.

Definition at line 135 of file Timing.h.

Constructor & Destructor Documentation

System::ProcessTime::ProcessTime ( )
inline

Constructor.

Definition at line 138 of file Timing.h.

138 : i_kernel(0), i_user(0), i_elapsed(0) {}
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
TimeValueType i_user
Definition: Timing.h:175
TimeValueType i_elapsed
Definition: Timing.h:175
System::ProcessTime::ProcessTime ( TimeValueType  k,
TimeValueType  u,
TimeValueType  e 
)
inline

Constructor.

Definition at line 141 of file Timing.h.

141  :
142  i_kernel(k), i_user(u), i_elapsed(e) {}
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
TimeValueType i_user
Definition: Timing.h:175
TimeValueType i_elapsed
Definition: Timing.h:175
System::ProcessTime::ProcessTime ( )
inline

Constructor.

Definition at line 138 of file Timing.h.

138 : i_kernel(0), i_user(0), i_elapsed(0) {}
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
TimeValueType i_user
Definition: Timing.h:175
TimeValueType i_elapsed
Definition: Timing.h:175
System::ProcessTime::ProcessTime ( TimeValueType  k,
TimeValueType  u,
TimeValueType  e 
)
inline

Constructor.

Definition at line 141 of file Timing.h.

141  :
142  i_kernel(k), i_user(u), i_elapsed(e) {}
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
TimeValueType i_user
Definition: Timing.h:175
TimeValueType i_elapsed
Definition: Timing.h:175

Member Function Documentation

template<TimeType T>
TimeValueType System::ProcessTime::cpuTime ( ) const
inline

Retrieve the CPU (user+kernel) time in the requested unit.

Definition at line 158 of file Timing.h.

158 { return adjustTime<T>(i_user + i_kernel); }
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
TimeValueType i_user
Definition: Timing.h:175
template<TimeType T>
TimeValueType System::ProcessTime::cpuTime ( ) const
inline

Retrieve the CPU (user+kernel) time in the requested unit.

Definition at line 158 of file Timing.h.

158 { return adjustTime<T>(i_user + i_kernel); }
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
TimeValueType i_user
Definition: Timing.h:175
template<TimeType T>
TimeValueType System::ProcessTime::elapsedTime ( ) const
inline

Retrieve the elapsed time in the requested unit.

Definition at line 154 of file Timing.h.

154 { return adjustTime<T>(i_elapsed); }
TimeValueType i_elapsed
Definition: Timing.h:175
template<TimeType T>
TimeValueType System::ProcessTime::elapsedTime ( ) const
inline

Retrieve the elapsed time in the requested unit.

Definition at line 154 of file Timing.h.

154 { return adjustTime<T>(i_elapsed); }
TimeValueType i_elapsed
Definition: Timing.h:175
template<TimeType T>
TimeValueType System::ProcessTime::kernelTime ( ) const
inline

Retrieve the kernel time in the requested unit.

Definition at line 146 of file Timing.h.

146 { return adjustTime<T>(i_kernel); }
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
template<TimeType T>
TimeValueType System::ProcessTime::kernelTime ( ) const
inline

Retrieve the kernel time in the requested unit.

Definition at line 146 of file Timing.h.

146 { return adjustTime<T>(i_kernel); }
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
ProcessTime& System::ProcessTime::operator+= ( const ProcessTime rhs)
inline

Add the timings to the current objects.

Definition at line 167 of file Timing.h.

167  {
168  i_kernel += rhs.i_kernel;
169  i_user += rhs.i_user;
170  i_elapsed += rhs.i_elapsed;
171  return *this;
172  }
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
TimeValueType i_user
Definition: Timing.h:175
TimeValueType i_elapsed
Definition: Timing.h:175
ProcessTime& System::ProcessTime::operator+= ( const ProcessTime rhs)
inline

Add the timings to the current objects.

Definition at line 167 of file Timing.h.

167  {
168  i_kernel += rhs.i_kernel;
169  i_user += rhs.i_user;
170  i_elapsed += rhs.i_elapsed;
171  return *this;
172  }
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
TimeValueType i_user
Definition: Timing.h:175
TimeValueType i_elapsed
Definition: Timing.h:175
ProcessTime System::ProcessTime::operator- ( const ProcessTime rhs) const
inline

Return the delta between two ProcessTime objects.

Definition at line 161 of file Timing.h.

161  {
162  return ProcessTime(i_kernel - rhs.i_kernel,
163  i_user - rhs.i_user,
164  i_elapsed - rhs.i_elapsed);
165  }
ProcessTime()
Constructor.
Definition: Timing.h:138
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
TimeValueType i_user
Definition: Timing.h:175
TimeValueType i_elapsed
Definition: Timing.h:175
ProcessTime System::ProcessTime::operator- ( const ProcessTime rhs) const
inline

Return the delta between two ProcessTime objects.

Definition at line 161 of file Timing.h.

161  {
162  return ProcessTime(i_kernel - rhs.i_kernel,
163  i_user - rhs.i_user,
164  i_elapsed - rhs.i_elapsed);
165  }
ProcessTime()
Constructor.
Definition: Timing.h:138
TimeValueType i_kernel
Internal storage.
Definition: Timing.h:175
TimeValueType i_user
Definition: Timing.h:175
TimeValueType i_elapsed
Definition: Timing.h:175
template<TimeType T>
TimeValueType System::ProcessTime::userTime ( ) const
inline

Retrieve the user time in the requested unit.

Definition at line 150 of file Timing.h.

150 { return adjustTime<T>(i_user); }
TimeValueType i_user
Definition: Timing.h:175
template<TimeType T>
TimeValueType System::ProcessTime::userTime ( ) const
inline

Retrieve the user time in the requested unit.

Definition at line 150 of file Timing.h.

150 { return adjustTime<T>(i_user); }
TimeValueType i_user
Definition: Timing.h:175

Member Data Documentation

TimeValueType System::ProcessTime::i_elapsed
private

Definition at line 175 of file Timing.h.

TimeValueType System::ProcessTime::i_kernel
private

Internal storage.

Definition at line 175 of file Timing.h.

TimeValueType System::ProcessTime::i_user
private

Definition at line 175 of file Timing.h.


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