Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

DALT_Server::RunTimeInfo Class Reference

This class provides cycle-based statistical information on the time required for completion. More...

#include <run_time_info.h>

List of all members.

Public Methods

 RunTimeInfo ()
 ~RunTimeInfo ()
void newCycle ()
void endCycle ()
void resume ()

Public Attributes

unsigned int cycles
unsigned long int last_cycle_time
unsigned long int average_cycle_time
unsigned long int thread_last_cycle_time
unsigned long int thread_average_cycle_time

Private Attributes

Chronometer* chronometer
clock_t utime_start
clock_t stime_start
tms times_struct
bool is_resumed


Detailed Description

This class provides cycle-based statistical information on the time required for completion.

Author:
Vlad Mereuta


Constructor & Destructor Documentation

DALT_Server::RunTimeInfo::RunTimeInfo ( )
 

constructor: sets up def values.

DALT_Server::RunTimeInfo::~RunTimeInfo ( )
 

destructor: frees pointers.


Member Function Documentation

void DALT_Server::RunTimeInfo::endCycle ( )
 

stops the current cycle and updates the times.

void DALT_Server::RunTimeInfo::newCycle ( )
 

starts a new cycle.

Note:
if you are calling this function to find out the processor time for a thread, make sure that the function is called by the thread itself, as it measures the start for the currently running thread

void DALT_Server::RunTimeInfo::resume ( )
 

resumes timing; ie start timing again withouth adding the time to a new timing cycle.


Member Data Documentation

unsigned long int DALT_Server::RunTimeInfo::average_cycle_time
 

the time take on average to complete a cycle; note that this measure is useless if your agent likes to take random times to complete each cycle.

Chronometer * DALT_Server::RunTimeInfo::chronometer [private]
 

chronometer used for timing the cycle.

unsigned int DALT_Server::RunTimeInfo::cycles
 

the number of cycles elapsed since creation.

bool DALT_Server::RunTimeInfo::is_resumed [private]
 

flag indicating whether the chronometer has been resumed in this cycle.

unsigned long int DALT_Server::RunTimeInfo::last_cycle_time
 

the time taken by the last cycle (in miliseconds =1/1000 s).

clock_t DALT_Server::RunTimeInfo::stime_start [private]
 

variables used to time the thread processor time.

unsigned long int DALT_Server::RunTimeInfo::thread_average_cycle_time
 

average processor time taken by the thread (in ms); note that all other times are 'real'.

unsigned long int DALT_Server::RunTimeInfo::thread_last_cycle_time
 

processor time taken by the thread (in ms); note that all other times are 'real'.

tms DALT_Server::RunTimeInfo::times_struct [private]
 

structure used to fetch time information.

clock_t DALT_Server::RunTimeInfo::utime_start [private]
 

variables used to time the thread processor time.


The documentation for this class was generated from the following file:
Generated at Thu Jan 31 15:22:43 2002 for DALT Server by doxygen1.2.8 written by Dimitri van Heesch, © 1997-2001