 |
VTK
9.0.1
|
Go to the documentation of this file.
49 #ifndef vtkRenderTimerLog_h
50 #define vtkRenderTimerLog_h
53 #include "vtkRenderingCoreModule.h"
63 #define VTK_SCOPED_RENDER_EVENT(eventName, timer) VTK_SCOPED_RENDER_EVENT2(eventName, timer, _event)
70 #define VTK_SCOPED_RENDER_EVENT2(eventName, timer, identifier) \
71 vtkRenderTimerLog::ScopedEventLogger identifier; \
74 std::ostringstream _eventNameStream; \
75 _eventNameStream << eventName; \
76 identifier = timer->StartScopedEvent(_eventNameStream.str()); \
86 struct VTKRENDERINGCORE_EXPORT
Event
111 this->
Print(os, 0.f, threshMs, indent);
117 void Print(std::ostream& os,
float parentTime,
float threshMs,
vtkIndent indent);
121 struct VTKRENDERINGCORE_EXPORT
Frame
129 void Print(std::ostream& os,
float threshMs = 0.f);
232 #endif // vtkRenderTimerLog_h
vtkTypeUInt64 StartTime
Times are in nanoseconds.
std::vector< Event > Events
std::string Name
Event name.
float ElapsedTimeSeconds() const
Convenience methods to compute times.
vtkTypeUInt64 ElapsedTimeNanoseconds() const
virtual void MarkFrame()
Call to mark the start of a new frame, or the end of an old one.
float ElapsedTimeMilliseconds() const
ScopedEventLogger StartScopedEvent(const std::string &name)
Create a RAII scoped event.
abstract base class for most VTK objects
void Print(std::ostream &os, float threshMs=0.f, vtkIndent indent=vtkIndent())
Print details of the event to a stream.
void Print(std::ostream &os, float threshMs=0.f)
Print details of all events in this frame to a stream.
void Print(const std::vector< T > &input, const std::string &name)
Print a vector with an associated name.
static vtkRenderTimerLog * New()
virtual bool IsSupported()
Returns true if stream timings are implemented for the current graphics backend.
a simple class to control print indentation
virtual void MarkEndEvent()
Mark the beginning or end of an event.
ScopedEventLogger(vtkRenderTimerLog *log)
virtual void ReleaseGraphicsResources()
Releases any resources allocated on the graphics device.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void MarkStartEvent(const std::string &name)
Mark the beginning or end of an event.
Container for a frame's events.
vtkTypeUInt64 EndTime
Times are in nanoseconds.
Asynchronously measures GPU execution times for a series of events.
virtual Frame PopFirstReadyFrame()
Retrieve the first available frame's timing info.
void Print(std::ostream &os, float parentTime, float threshMs, vtkIndent indent)
virtual bool FrameReady()
Returns true if there are any frames ready with complete timing info.
RAII struct for logging events.
Container for a single timed event.
std::vector< Event > Events
Child events that occurred while this event was running.
ScopedEventLogger & operator=(ScopedEventLogger &&other)
~vtkRenderTimerLog() override
ScopedEventLogger(ScopedEventLogger &&other)