performance_counter Class Reference
[Performance Library]

#include <unixstl/performance/performance_counter.hpp>

List of all members.


Detailed Description

A performance counter using gettimeofday().

This class provides performance monitoring functionality based around the UNIX gettimeofday() API.

Attributes

interval_type get_period_count () const
 The elapsed count in the measurement period.
interval_type get_seconds () const
 The number of whole seconds in the measurement period.
interval_type get_milliseconds () const
 The number of whole milliseconds in the measurement period.
interval_type get_microseconds () const
 The number of whole microseconds in the measurement period.
interval_type stop_get_period_count_and_restart ()
 Stops the current period, starts the next, and returns the period count for the prior period.
interval_type stop_get_seconds_and_restart ()
 Stops the current period, starts the next, and returns the interval, in seconds, for the prior period.
interval_type stop_get_milliseconds_and_restart ()
 Stops the current period, starts the next, and returns the interval, in milliseconds, for the prior period.
interval_type stop_get_microseconds_and_restart ()
 Stops the current period, starts the next, and returns the interval, in microseconds, for the prior period.
static epoch_type get_epoch ()
 The current epoch.
static interval_type get_seconds (epoch_type start, epoch_type end)
 The number of whole seconds in the given measurement period.
static interval_type get_milliseconds (epoch_type start, epoch_type end)
 The number of whole milliseconds in the given measurement period.
static interval_type get_microseconds (epoch_type start, epoch_type end)
 The number of whole microseconds in the given measurement period.

Public Types

Member Types
typedef struct timeval epoch_type
 The epoch type.
typedef us_sint64_t interval_type
 The interval type.
typedef performance_counter class_type
 The class type.

Public Member Functions

Operations
void start ()
 Starts measurement.
void stop ()
 Ends measurement.
void restart ()
 Ends the current measurement period and start the next.


Member Typedef Documentation

typedef struct timeval epoch_type [read]

The epoch type.

The type of the epoch measurement, a 64-bit signed integer.

typedef us_sint64_t interval_type

The interval type.

The type of the interval measurement, a 64-bit signed integer

The class type.


Member Function Documentation

void start (  ) 

Starts measurement.

Begins the measurement period

void stop (  ) 

Ends measurement.

Ends the measurement period

void restart (  ) 

Ends the current measurement period and start the next.

Remarks:
This is equivalent to an atomic invocation of stop() and start()

static epoch_type get_epoch (  )  [static]

The current epoch.

static interval_type get_seconds ( epoch_type  start,
epoch_type  end 
) [static]

The number of whole seconds in the given measurement period.

static interval_type get_milliseconds ( epoch_type  start,
epoch_type  end 
) [static]

The number of whole milliseconds in the given measurement period.

static interval_type get_microseconds ( epoch_type  start,
epoch_type  end 
) [static]

The number of whole microseconds in the given measurement period.

interval_type get_period_count (  )  const

The elapsed count in the measurement period.

This represents the extent, in arbitrary units, of the measurement period

interval_type get_seconds (  )  const

The number of whole seconds in the measurement period.

This represents the extent, in whole seconds, of the measurement period

interval_type get_milliseconds (  )  const

The number of whole milliseconds in the measurement period.

This represents the extent, in whole milliseconds, of the measurement period

interval_type get_microseconds (  )  const

The number of whole microseconds in the measurement period.

This represents the extent, in whole microseconds, of the measurement period

interval_type stop_get_period_count_and_restart (  ) 

Stops the current period, starts the next, and returns the period count for the prior period.

interval_type stop_get_seconds_and_restart (  ) 

Stops the current period, starts the next, and returns the interval, in seconds, for the prior period.

interval_type stop_get_milliseconds_and_restart (  ) 

Stops the current period, starts the next, and returns the interval, in milliseconds, for the prior period.

interval_type stop_get_microseconds_and_restart (  ) 

Stops the current period, starts the next, and returns the interval, in microseconds, for the prior period.


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

Generated on Thu Jun 10 08:59:08 2010 for STLSoft by  doxygen 1.5.6