Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkTimerLog Class Reference

Timer support and logging. More...

#include <vtkTimerLog.h>

Inheritance diagram for vtkTimerLog:

Inheritance graph
[legend]
Collaboration diagram for vtkTimerLog:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void StartTimer ()
void StopTimer ()
double GetElapsedTime ()

Static Public Methods

vtkTimerLog * New ()
int IsTypeOf (const char *type)
vtkTimerLog * SafeDownCast (vtkObject *o)
void SetMaxEntries (int a)
int GetMaxEntries ()
void FormatAndMarkEvent (char *EventString,...)
void DumpLog (char *filename)
void MarkEvent (char *EventString)
void ResetLog ()
void AllocateLog ()
double GetCurrentTime ()
double GetCPUTime ()

Protected Methods

 vtkTimerLog ()
 ~vtkTimerLog ()
 vtkTimerLog (const vtkTimerLog &)
void operator= (const vtkTimerLog &)

Static Protected Methods

void DumpEntry (ostream &os, int index, float time, float deltatime, int tick, int deltatick, char *event)

Protected Attributes

double StartTime
double EndTime

Static Protected Attributes

int MaxEntries
int NextEntry
int WrapFlag
int TicksPerSecond
vtkTimerLogEntryTimerLog
timeval FirstWallTime
timeval CurrentWallTime
tms FirstCpuTicks
tms CurrentCpuTicks

Detailed Description

Timer support and logging.

Date:
2000/12/20 21:00:13
Revision:
1.25.2.1

vtkTimerLog contains walltime and cputime measurements associated with a given event. These results can be later analyzed when "dumping out" the table.

In addition, vtkTimerLog allows the user to simply get the current time, and to start/stop a simple timer separate from the timing table logging.

Examples:
vtkTimerLog (examples)

Definition at line 110 of file vtkTimerLog.h.


Constructor & Destructor Documentation

vtkTimerLog::vtkTimerLog   [inline, protected]
 

Definition at line 161 of file vtkTimerLog.h.

vtkTimerLog::~vtkTimerLog   [inline, protected]
 

Definition at line 162 of file vtkTimerLog.h.

vtkTimerLog::vtkTimerLog const vtkTimerLog &    [inline, protected]
 

Definition at line 163 of file vtkTimerLog.h.


Member Function Documentation

vtkTimerLog* vtkTimerLog::New   [static]
 

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual const char* vtkTimerLog::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

int vtkTimerLog::IsTypeOf const char *    type [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual int vtkTimerLog::IsA const char *    type [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

vtkTimerLog* vtkTimerLog::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

void vtkTimerLog::PrintSelf ostream &    os,
vtkIndent    indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

void vtkTimerLog::SetMaxEntries int    a [static]
 

Set/Get the maximum number of entries allowed in the timer log

int vtkTimerLog::GetMaxEntries   [static]
 

void vtkTimerLog::FormatAndMarkEvent char *    EventString,
...   
[static]
 

Record a timing event. The event is represented by a formatted string.

void vtkTimerLog::DumpLog char *    filename [static]
 

Write the timing table out to a file. Calculate some helpful statistics (deltas and percentages) in the process.

void vtkTimerLog::MarkEvent char *    EventString [static]
 

Record a timing event and capture wall time and cpu ticks.

void vtkTimerLog::ResetLog   [static]
 

Clear the timing table. walltime and cputime will also be set to zero when the first new event is recorded.

void vtkTimerLog::AllocateLog   [static]
 

Allocate timing table with MaxEntries elements.

double vtkTimerLog::GetCurrentTime   [static]
 

Returns the elapsed number of seconds since January 1, 1970. This is also called Universal Coordinated Time.

double vtkTimerLog::GetCPUTime   [static]
 

Returns the CPU time for this process On Win32 platforms this actually returns wall time.

void vtkTimerLog::StartTimer  
 

Set the StartTime to the current time. Used with GetElapsedTime().

void vtkTimerLog::StopTimer  
 

Sets EndTime to the current time. Used with GetElapsedTime().

double vtkTimerLog::GetElapsedTime  
 

Returns the difference between StartTime and EndTime as a floating point value indicating the elapsed time in seconds.

void vtkTimerLog::operator= const vtkTimerLog &    [inline, protected]
 

Definition at line 164 of file vtkTimerLog.h.

void vtkTimerLog::DumpEntry ostream &    os,
int    index,
float    time,
float    deltatime,
int    tick,
int    deltatick,
char *    event
[static, protected]
 


Member Data Documentation

int vtkTimerLog::MaxEntries [static, protected]
 

Definition at line 166 of file vtkTimerLog.h.

int vtkTimerLog::NextEntry [static, protected]
 

Definition at line 167 of file vtkTimerLog.h.

int vtkTimerLog::WrapFlag [static, protected]
 

Definition at line 168 of file vtkTimerLog.h.

int vtkTimerLog::TicksPerSecond [static, protected]
 

Definition at line 169 of file vtkTimerLog.h.

vtkTimerLogEntry* vtkTimerLog::TimerLog [static, protected]
 

Definition at line 170 of file vtkTimerLog.h.

timeval vtkTimerLog::FirstWallTime [static, protected]
 

Definition at line 176 of file vtkTimerLog.h.

timeval vtkTimerLog::CurrentWallTime [static, protected]
 

Definition at line 177 of file vtkTimerLog.h.

tms vtkTimerLog::FirstCpuTicks [static, protected]
 

Definition at line 178 of file vtkTimerLog.h.

tms vtkTimerLog::CurrentCpuTicks [static, protected]
 

Definition at line 179 of file vtkTimerLog.h.

double vtkTimerLog::StartTime [protected]
 

Definition at line 184 of file vtkTimerLog.h.

double vtkTimerLog::EndTime [protected]
 

Definition at line 185 of file vtkTimerLog.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 13:00:53 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001