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);
255 void operator=(
const vtkTimerLog&) VTK_DELETE_FUNCTION;
262 #define vtkTimerLogMacro(string) \ 264 vtkTimerLog::FormatAndMarkEvent("Mark: In %s, line %d, class %s: %s", \ 265 __FILE__, __LINE__, this->GetClassName(), string); \
abstract base class for most VTK objects
static std::vector< vtkTimerLogEntry > TimerLog
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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 vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
static int TicksPerSecond
static timeval FirstWallTime
static tms CurrentCpuTicks