Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound 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
vtkTimerLogEntry * TimerLog
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)


Member Function Documentation

void vtkTimerLog::AllocateLog   [static]
 

Allocate timing table with MaxEntries elements.

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::FormatAndMarkEvent char *    EventString,
...   
[static]
 

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

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.

double vtkTimerLog::GetCPUTime   [static]
 

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

double vtkTimerLog::GetCurrentTime   [static]
 

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

double vtkTimerLog::GetElapsedTime  
 

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

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.

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.

void vtkTimerLog::MarkEvent char *    EventString [static]
 

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

vtkTimerLog* vtkTimerLog::New   [static]
 

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

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::ResetLog   [static]
 

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

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::SetMaxEntries int    a [static]
 

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

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().


The documentation for this class was generated from the following file:
Generated on Tue Mar 19 13:33:49 2002 for VTK by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002