Go to the documentation of this file.
31 #include "vtkCommonSystemModule.h"
38 #include <sys/types.h>
39 #include <sys/timeb.h>
43 #include <sys/types.h>
44 #include <sys/times.h>
54 # define SELECT_MASK fd_set
60 # define SELECT_MASK void
62 # define SELECT_MASK int
106 static void SetMaxEntries(
int a);
107 static int GetMaxEntries();
114 static void FormatAndMarkEvent(
const char *EventString, ...);
121 static void DumpLog(
const char *filename);
130 static void MarkStartEvent(
const char *EventString);
131 static void MarkEndEvent(
const char *EventString);
139 static void InsertTimedEvent(
140 const char *EventString,
double time,
int cpuTicks);
143 static void DumpLogWithIndents(ostream *os,
double threshold);
144 static void DumpLogWithIndentsAndPercentages(ostream *os);
150 static int GetNumberOfEvents();
151 static int GetEventIndent(
int i);
152 static double GetEventWallTime(
int i);
153 static const char* GetEventString(
int i);
160 static void MarkEvent(
const char *EventString);
166 static void ResetLog();
173 static void AllocateLog();
179 static void CleanupLog();
185 static double GetUniversalTime();
191 static double GetCPUTime();
207 double GetElapsedTime();
223 static timeb FirstWallTime;
224 static timeb CurrentWallTime;
226 static FILETIME FirstWallTime;
227 static FILETIME CurrentWallTime;
239 static void MarkEventInternal(
250 static void DumpEntry(ostream& os,
int index,
double time,
double deltatime,
251 int tick,
int deltatick,
const char *event);
288 #define vtkTimerLogMacro(string) \
290 vtkTimerLog::FormatAndMarkEvent("Mark: In %s, line %d, class %s: %s", \
291 __FILE__, __LINE__, this->GetClassName(), string); \
static std::vector< vtkTimerLogEntry > TimerLog
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
abstract base class for most VTK objects
static void MarkStartEvent(const char *EventString)
I want to time events, so I am creating this interface to mark events that have a start and an end.
a simple class to control print indentation
vtkTimerLogScope(const char *eventString)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static timeval CurrentWallTime
Helper class to log time within scope.
static void SetLogging(int v)
This flag will turn logging of events off or on.
Timer support and logging.
static int TicksPerSecond
static timeval FirstWallTime
static void MarkEndEvent(const char *EventString)
static tms CurrentCpuTicks