37 #include "vtkCommonSystemModule.h" 44 #include <sys/types.h> 45 #include <sys/timeb.h> 49 #include <sys/types.h> 50 #include <sys/times.h> 60 # define SELECT_MASK fd_set 66 # define SELECT_MASK void 68 # define SELECT_MASK int 97 void PrintSelf(ostream& os,
vtkIndent indent) VTK_OVERRIDE;
112 static void SetMaxEntries(
int a);
113 static int GetMaxEntries();
120 static void FormatAndMarkEvent(
const char *EventString, ...);
127 static void DumpLog(
const char *filename);
136 static void MarkStartEvent(
const char *EventString);
137 static void MarkEndEvent(
const char *EventString);
145 static void InsertTimedEvent(
146 const char *EventString,
double time,
int cpuTicks);
149 static void DumpLogWithIndents(ostream *os,
double threshold);
150 static void DumpLogWithIndentsAndPercentages(ostream *os);
156 static int GetNumberOfEvents();
157 static int GetEventIndent(
int i);
158 static double GetEventWallTime(
int i);
159 static const char* GetEventString(
int i);
166 static void MarkEvent(
const char *EventString);
172 static void ResetLog();
179 static void AllocateLog();
185 static void CleanupLog();
191 static double GetUniversalTime();
197 static double GetCPUTime();
213 double GetElapsedTime();
229 static timeb FirstWallTime;
230 static timeb CurrentWallTime;
232 static FILETIME FirstWallTime;
233 static FILETIME CurrentWallTime;
245 static void MarkEventInternal(
256 static void DumpEntry(ostream& os,
int index,
double time,
double deltatime,
257 int tick,
int deltatick,
const char *event);
261 void operator=(
const vtkTimerLog&) VTK_DELETE_FUNCTION;
268 #define vtkTimerLogMacro(string) \ 270 vtkTimerLog::FormatAndMarkEvent("Mark: In %s, line %d, class %s: %s", \ 271 __FILE__, __LINE__, this->GetClassName(), string); \
abstract base class for most VTK objects
static std::vector< vtkTimerLogEntry > TimerLog
Timer support and logging.
a simple class to control print indentation
static timeval CurrentWallTime
static void SetLogging(int v)
This flag will turn logging of events off or on.
static int TicksPerSecond
static timeval FirstWallTime
static tms CurrentCpuTicks