 |
VTK
9.1.0
|
Go to the documentation of this file.
137 #ifndef vtkTimerLog_h
138 #define vtkTimerLog_h
140 #include "vtkCommonSystemModule.h"
146 #include <sys/timeb.h>
147 #include <sys/types.h>
149 #include <sys/time.h>
150 #include <sys/times.h>
151 #include <sys/types.h>
162 #define SELECT_MASK fd_set
165 typedef long fd_mask;
168 #define SELECT_MASK void
170 #define SELECT_MASK int
332 static timeb FirstWallTime;
333 static timeb CurrentWallTime;
335 static FILETIME FirstWallTime;
336 static FILETIME CurrentWallTime;
359 int deltatick,
const char* event);
394 #define vtkTimerLogMacro(string) \
396 vtkTimerLog::FormatAndMarkEvent( \
397 "Mark: In %s, line %d, class %s: %s", __FILE__, __LINE__, this->GetClassName(), string); \
static void FormatAndMarkEvent(const char *format,...) VTK_FORMAT_PRINTF(1
Record a timing event.
static double GetCPUTime()
Returns the CPU time for this process On Win32 platforms this actually returns wall time.
static int GetEventIndent(int i)
Programmatic access to events.
void StopTimer()
Sets EndTime to the current time.
static void static void DumpLog(VTK_FILEPATH const char *filename)
Write the timing table out to a file.
static void InsertTimedEvent(const char *EventString, double time, int cpuTicks)
Insert an event with a known wall time value (in seconds) and cpuTicks.
static void MarkEventInternal(const char *EventString, vtkTimerLogEntry::LogEntryType type, vtkTimerLogEntry *entry=nullptr)
Record a timing event and capture wall time and cpu ticks.
abstract base class for most VTK objects
void StartTimer()
Set the StartTime to the current time.
static double GetEventWallTime(int i)
Programmatic access to events.
static vtkTimerLog * New()
static vtkTimerLogEntry::LogEntryType GetEventType(int i)
Programmatic access to events.
static double GetUniversalTime()
Returns the elapsed number of seconds since 00:00:00 Coordinated Universal Time (UTC),...
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.
static void DumpLogWithIndents(ostream *os, double threshold)
static vtkTimerLogEntry * GetEvent(int i)
a simple class to control print indentation
vtkTimerLogScope(const char *eventString)
static void CleanupLog()
Remove timer log.
static const char * GetEventString(int i)
Programmatic access to events.
static timeval CurrentWallTime
Helper class to log time within scope.
static vtkTimerLogCleanup vtkTimerLogCleanupInstance
static void DumpLogWithIndentsAndPercentages(ostream *os)
static void MarkEvent(const char *EventString)
Record a timing event and capture wall time and cpu ticks.
static int GetMaxEntries()
Set/Get the maximum number of entries allowed in the timer log.
~vtkTimerLog() override=default
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
double GetElapsedTime()
Returns the difference between StartTime and EndTime as a doubleing point value indicating the elapse...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static void MarkEndEvent(const char *EventString)
I want to time events, so I am creating this interface to mark events that have a start and an end.
static int GetNumberOfEvents()
Programmatic access to events.
static void SetMaxEntries(int a)
Set/Get the maximum number of entries allowed in the timer log.
static tms CurrentCpuTicks
static void DumpEntry(ostream &os, int index, double time, double deltatime, int tick, int deltatick, const char *event)
static void ResetLog()
Clear the timing table.