VTK
vtkExecutionTimer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAppendFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
34 #ifndef vtkExecutionTimer_h
35 #define vtkExecutionTimer_h
36 
37 #include "vtkObject.h"
38 #include "vtkFiltersCoreModule.h" // For export macro
39 
40 class vtkAlgorithm;
41 class vtkCallbackCommand;
42 
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
52 
54 
61 
63 
66  vtkGetMacro(ElapsedCPUTime, double);
68 
70 
73  vtkGetMacro(ElapsedWallClockTime, double);
75 
76 protected:
79 
80  // This is the observer that will catch StartEvent and hand off to
81  // EventRelay
83 
84  // This is the filter that will be timed
86 
87  // These are where we keep track of the timestamps for start/end
88  double CPUStartTime;
89  double CPUEndTime;
90 
93 
96 
98 
101  void StartTimer();
102  void StopTimer();
104 
107  virtual void TimerFinished();
108 
112  static void EventRelay(vtkObject* caller, unsigned long eventId, void* clientData, void* callData);
113 
114 private:
115  vtkExecutionTimer(const vtkExecutionTimer&); // Not implemented.
116  void operator=(const vtkExecutionTimer&); // Not implemented.
117 
118 };
119 
120 #endif
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkExecutionTimer::vtkExecutionTimer
vtkExecutionTimer()
vtkExecutionTimer::New
static vtkExecutionTimer * New()
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:62
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkExecutionTimer::CPUEndTime
double CPUEndTime
Definition: vtkExecutionTimer.h:89
vtkExecutionTimer::~vtkExecutionTimer
~vtkExecutionTimer()
vtkExecutionTimer::StartTimer
void StartTimer()
vtkFiltersCoreModule.h
vtkExecutionTimer::WallClockEndTime
double WallClockEndTime
Definition: vtkExecutionTimer.h:92
vtkExecutionTimer::EventRelay
static void EventRelay(vtkObject *caller, unsigned long eventId, void *clientData, void *callData)
vtkExecutionTimer::StopTimer
void StopTimer()
vtkExecutionTimer::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkExecutionTimer::Filter
vtkAlgorithm * Filter
Definition: vtkExecutionTimer.h:85
VTKFILTERSCORE_EXPORT
#define VTKFILTERSCORE_EXPORT
Definition: vtkFiltersCoreModule.h:15
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkgl::filter
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: vtkgl.h:13514
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkObject.h
vtkExecutionTimer::ElapsedCPUTime
double ElapsedCPUTime
Definition: vtkExecutionTimer.h:94
vtkExecutionTimer
Time filter execution.
Definition: vtkExecutionTimer.h:44
vtkExecutionTimer::SetFilter
void SetFilter(vtkAlgorithm *filter)
vtkExecutionTimer::TimerFinished
virtual void TimerFinished()
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:50
vtkExecutionTimer::ElapsedWallClockTime
double ElapsedWallClockTime
Definition: vtkExecutionTimer.h:95
vtkExecutionTimer::CPUStartTime
double CPUStartTime
Definition: vtkExecutionTimer.h:88
vtkExecutionTimer::WallClockStartTime
double WallClockStartTime
Definition: vtkExecutionTimer.h:91
vtkExecutionTimer::Callback
vtkCallbackCommand * Callback
Definition: vtkExecutionTimer.h:82