HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_Performance Class Reference

#include <UT_Performance.h>

+ Inheritance diagram for UT_Performance:

Public Member Functions

 UT_Performance ()
 
virtual ~UT_Performance ()
 
int startTimedEvent (const char *event, const char *object, bool auto_nest_events=true)
 
int startMemoryEvent (const char *object, bool auto_nest_events=true)
 
int startTimedCookEvent (int node_id, const char *cook_event_name=NULL)
 
int startMemoryCookEvent (int node_id, const char *cook_event_name=NULL)
 
void addTimedCookEvent (int node_id, fpreal time, const char *cook_event_name=NULL)
 
int startTimedPDGEvent (const char *path, const char *pdg_event_name=NULL)
 
int startMemoryPDGEvent (const char *path, const char *pdg_event_name=NULL)
 
void addTimedPDGEvent (const char *path, fpreal time, const char *pdg_event_name=NULL)
 
int startTimedSolveEvent (const SIM_Solver *solver, const char *solver_event_name=NULL)
 
int startMemorySolveEvent (const SIM_Solver *solver, const char *solver_event_name=NULL)
 
int startTimedDrawEvent (const char *object, const char *draw_event_name, bool is_gpu_draw=false)
 
int startMemoryDrawEvent (const char *object, const char *draw_event_name, bool is_gpu_draw=false)
 
int startTimedViewportDrawEvent (const char *viewport_name, const char *draw_event_name, UT_PerfMonViewportType viewport_type, bool is_gpu_draw=false)
 
int startMemoryViewportDrawEvent (const char *viewport_name, const char *draw_event_name, UT_PerfMonViewportType viewport_type, bool is_gpu_draw=false)
 
void addTimedDrawEvent (const char *object, const char *draw_event_name, fpreal time, bool is_gpu_draw=false)
 
void addTimedViewportDrawEvent (const char *object, const char *draw_event_name, UT_PerfMonViewportType viewport_type, fpreal time, bool is_gpu_draw=false)
 
int startTimedScriptEvent (const char *code_description, UT_PerfMonScriptType script_type, bool auto_nest_events=true)
 
int startMemoryScriptEvent (const char *code_description, UT_PerfMonScriptType script_type, bool auto_nest_events=true)
 
int startTimedNodeScriptEvent (int node_id, const char *code_description, UT_PerfMonScriptType script_type)
 
int startMemoryNodeScriptEvent (int node_id, const char *code_description, UT_PerfMonScriptType script_type)
 
int startTimedRenderEvent (const char *renderer, const char *operation, bool is_renderer_a_node, int frame_num, const char *object=NULL)
 
int startMemoryRenderEvent (const char *renderer, const char *operation, bool is_renderer_a_node, int frame_num, const char *object=NULL)
 
void addTimedRenderEvent (const char *object, bool is_renderer_a_node, int frame_num, fpreal time)
 
void addMemoryRenderEvent (const char *object, bool is_renderer_a_node, int frame_num, fpreal value)
 
int startTimedFrameEvent (fpreal frame)
 
int startMemoryFrameEvent (fpreal frame)
 
int startTimedNodeCreationEvent ()
 
int startMemoryNodeCreationEvent ()
 
void stopNodeCreationEvent (int event_id, int node_id)
 
int startTimedPaneEvent (const char *pane, const char *operation)
 Start a timed geometry spreadsheet render event. More...
 
int startMemoryPaneEvent (const char *pane, const char *operation)
 
fpreal stopEvent (int event_id, bool return_value=false)
 
void cancelEvent (int event_id)
 
void logMessage (const char *message)
 Log a generic message event. More...
 
const UT_PerfMonEventgetEvent (int event_id) const
 
const UT_PerfMonTimedEventgetTimedEvent (int event_id) const
 
virtual int startTaskScope (const UT_TaskScope *task_scope)
 
virtual void stopTaskScope (const UT_TaskScope *task_scope, int event_id)
 
void setEventExtraInfo (int event_id, const char *extra_info) const
 
virtual int getEventListenPort () const
 
int startProfile (const char *title, const UT_PerfMonRecordOptions *options=NULL)
 
void stopProfile (int profile_id)
 
void cancelProfile (int profile_id)
 
void pauseProfile (int profile_id)
 
void resumeProfile (int profile_id)
 
int loadProfile (const char *file_path, UT_StringArray &errors)
 
bool saveProfile (int profile_id, UT_JSONWriter &writer) const
 
bool saveProfile (int profile_id, const char *file_path)
 Return true if the save succeeded. Return false otherwise. More...
 
void removeProfile (int profile_id)
 
void removeAllProfiles ()
 Delete all profiles and unregister them from the performance monitor. More...
 
void renameProfile (int profile_id, const char *profile_name)
 Rename the specified profile. More...
 
void changeProfileRecordOptions (int profile_id, const UT_PerfMonRecordOptions &options)
 Change the recording options for the specified profile. More...
 
void clearProfileStats (int profile_id)
 Clear the stats for the given profile. More...
 
const UT_PerfMonProfilegetProfile (int profile_id) const
 
int getActiveProfileId () const
 
void setActiveProfileId (int profile_id)
 Set the active profile to the given id. More...
 
int numCompletedProfiles () const
 
const UT_PerfMonProfilegetCompletedProfile (int index) const
 
int getProfileByFilePath (const char *file_path) const
 
void addProfileInterest (void *callee, UT_PerfMonProfileEventMethod callback)
 
void removeProfileInterest (void *callee, UT_PerfMonProfileEventMethod callback)
 
bool hasProfileInterest (void *callee, UT_PerfMonProfileEventMethod callback)
 
void addEventInterest (void *callee, UT_PerfMonEventCB callback, const UT_PerfMonRecordOptions &options)
 
void changeEventInterestRecordOptions (void *callee, UT_PerfMonEventCB callback, const UT_PerfMonRecordOptions &options)
 Update the recording options for the specified event interest. More...
 
void removeEventInterest (void *callee, UT_PerfMonEventCB callback)
 Remove an interest for events. More...
 
bool hasEventInterest (void *callee, UT_PerfMonEventCB callback)
 
int createDiffProfile (int id1, int id2)
 
bool isRecording (bool profile_only=false) const
 
bool isRecordingCookStats (bool profile_only=false) const
 Return true if Houdini is recording cook stats. More...
 
bool isRecordingPDGCookStats () const
 Return true if Houdini is recording pdg cook stats. More...
 
bool isRecordingSolveStats () const
 Return true if Houdini is recording simulation solve stats. More...
 
bool isRecordingObjectDrawStats () const
 Return true if Houdini is recording object draw stats. More...
 
bool isRecordingObjectGPUDrawStats () const
 Return true if Houdini is recording object draw stats. More...
 
bool isRecordingViewportStats () const
 Return true if Houdini is recording viewport draw stats. More...
 
bool isRecordingPaneStats () const
 Return true if Houdini is recording pane related stats. More...
 
bool isRecordingScriptStats () const
 Return true if Houdini is recording script stats. More...
 
bool isRecordingRenderStats () const
 Return true if Houdini is recording render stats. More...
 
bool isRecordingThreadStats () const
 Return true if Houdini is recording thread stats. More...
 
bool isRecordingFrameStats () const
 Return true if Houdini is recording frame stats. More...
 
bool isRecordingMemoryStats () const
 Return true if Houdini is recording memory stats. More...
 
bool isRecordingErrors () const
 Return true if Houdini is recording errors. More...
 
virtual bool isRecordingAllowedFor (OP_Node *node) const
 
int getNumRecordedTimedFrameEvents () const
 
int getNumRecordedMemoryFrameEvents () const
 
fpreal getTotalRecordedFrameEventTime () const
 
fpreal getTotalRecordedFrameEventMemory () const
 
void resetCumulativeFrameStats ()
 Reset the performance monitor's accumulated frame statistics. More...
 
virtual const char * getStatsIcon (const UT_PerfMonStats *stats) const
 
void setDisplayNodeInfo (bool display)
 
bool getDisplayNodeInfo () const
 
void getPerformanceColor (fpreal pos, UT_Color &c)
 
const UT_RampgetRampColorScheme () const
 Return the ramp color scheme used by the performance monitor. More...
 
void setRampColorScheme (const UT_Ramp &src_ramp)
 Set the performance monitor's ramp color scheme. More...
 
void loadRampColorScheme (const char *str_color_scheme)
 Load the ramp color scheme from the given string representation. More...
 
void saveRampColorScheme (UT_String &str_color_scheme)
 Save a representation of the ramp color scheme to the given string. More...
 
const UT_RampgetDefaultColorRampScheme ()
 Return the default ramp color scheme. More...
 
void reset ()
 

Protected Member Functions

virtual int getCurrentFrameSubclass_ ()
 Return the current frame. More...
 
virtual OP_NodegetNodeSubclass_ (int node_id) const
 Return a pointer to the node specified by the given id. More...
 
virtual OP_NodegetNodeFromSolverSubclass_ (const SIM_Solver *solver) const
 Return a pointer to the node that is bound to the given SIM solver. More...
 
virtual void getObjectPathFromNodeSubclass_ (OP_Node *node, const char *event_name, UT_WorkBuffer &object_path) const
 
virtual void getObjectPathFromSolverAndNodeSubclass_ (const SIM_Solver *solver, OP_Node *node, const char *event_name, UT_WorkBuffer &object_path) const
 
virtual void getExtraInfoFromNodeSubclass_ (OP_Node *node, UT_WorkBuffer &extra_info) const
 
virtual void startRemoteListener_ ()
 Start the remote listener to handle incoming information. More...
 

Detailed Description

Definition at line 65 of file UT_Performance.h.

Constructor & Destructor Documentation

UT_Performance::UT_Performance ( )
virtual UT_Performance::~UT_Performance ( )
virtual

Member Function Documentation

void UT_Performance::addEventInterest ( void callee,
UT_PerfMonEventCB  callback,
const UT_PerfMonRecordOptions options 
)

Add an interest for running events. You can pass in a set of record options to define the types of events that you are interested in.

void UT_Performance::addMemoryRenderEvent ( const char *  object,
bool  is_renderer_a_node,
int  frame_num,
fpreal  value 
)
void UT_Performance::addProfileInterest ( void callee,
UT_PerfMonProfileEventMethod  callback 
)

Add an interest for profile events. Do nothing if the interest has been previously added.

void UT_Performance::addTimedCookEvent ( int  node_id,
fpreal  time,
const char *  cook_event_name = NULL 
)

Add a new timed cook event. Instead of starting and stopping the event, immediately set the event's run time to time. The event is added to any interested profiles and observers.

void UT_Performance::addTimedDrawEvent ( const char *  object,
const char *  draw_event_name,
fpreal  time,
bool  is_gpu_draw = false 
)

Add a new timed draw event. Instead of starting and stopping the event, immediately set the event's run time to time. The event is added to any interested profiles and observers.

void UT_Performance::addTimedPDGEvent ( const char *  path,
fpreal  time,
const char *  pdg_event_name = NULL 
)

Add a new timed cook event. Instead of starting and stopping the event, immediately set the event's run time to time. The event is added to any interested profiles and observers.

void UT_Performance::addTimedRenderEvent ( const char *  object,
bool  is_renderer_a_node,
int  frame_num,
fpreal  time 
)

Add a new timed or memory render event. Instead of starting and stopping the event, immediately set the event's run time or memory. The event is added to any interested profiles and observers.

void UT_Performance::addTimedViewportDrawEvent ( const char *  object,
const char *  draw_event_name,
UT_PerfMonViewportType  viewport_type,
fpreal  time,
bool  is_gpu_draw = false 
)

Add a new timed viewport draw event. Instead of starting and stopping the event, immediately set the event's run time to time. The event is added to any interested profiles and observers.

void UT_Performance::cancelEvent ( int  event_id)

Cancel a running event. The event is stopped but is not added to any profiles nor is it broadcast to any observers. Do nothing if the event does not exist or if it is not running.

void UT_Performance::cancelProfile ( int  profile_id)

Cancel the specified profile. Do nothing if the profile does not exist or is not profiling.

void UT_Performance::changeEventInterestRecordOptions ( void callee,
UT_PerfMonEventCB  callback,
const UT_PerfMonRecordOptions options 
)

Update the recording options for the specified event interest.

void UT_Performance::changeProfileRecordOptions ( int  profile_id,
const UT_PerfMonRecordOptions options 
)

Change the recording options for the specified profile.

void UT_Performance::clearProfileStats ( int  profile_id)

Clear the stats for the given profile.

int UT_Performance::createDiffProfile ( int  id1,
int  id2 
)

Create a new profile that stores difference in stats between profiles Return the unique id for the new profile.

int UT_Performance::getActiveProfileId ( ) const
inline

Return the id of the active profile. Return UT_PERFMON_INVALID_ID if there is no active profile.

Definition at line 386 of file UT_Performance.h.

const UT_PerfMonProfile* UT_Performance::getCompletedProfile ( int  index) const

Return the completed profile at the specified index. A completed profile is a profile that is no longer recording events and has generated stats.

virtual int UT_Performance::getCurrentFrameSubclass_ ( )
protectedvirtual

Return the current frame.

Reimplemented in MOT_Performance.

const UT_Ramp& UT_Performance::getDefaultColorRampScheme ( )

Return the default ramp color scheme.

bool UT_Performance::getDisplayNodeInfo ( ) const
inline

Definition at line 585 of file UT_Performance.h.

const UT_PerfMonEvent* UT_Performance::getEvent ( int  event_id) const

Return the specified event. (read-only) Return NULL if the requested event does not exist.

virtual int UT_Performance::getEventListenPort ( ) const
inlinevirtual

Return the port that the performance monitor is listening on for remote events. Return 0 if the performance monitor is currently not listening for events.

Reimplemented in NET_Performance.

Definition at line 306 of file UT_Performance.h.

virtual void UT_Performance::getExtraInfoFromNodeSubclass_ ( OP_Node node,
UT_WorkBuffer extra_info 
) const
protectedvirtual

Pass back extra info that can be tied to a UT_PerfMonStats object. The extra info is generated from the given node.

Reimplemented in MOT_Performance.

virtual OP_Node* UT_Performance::getNodeFromSolverSubclass_ ( const SIM_Solver solver) const
protectedvirtual

Return a pointer to the node that is bound to the given SIM solver.

Reimplemented in MOT_Performance.

virtual OP_Node* UT_Performance::getNodeSubclass_ ( int  node_id) const
protectedvirtual

Return a pointer to the node specified by the given id.

Reimplemented in MOT_Performance.

int UT_Performance::getNumRecordedMemoryFrameEvents ( ) const
inline

Return the number of memory frame events recorded by the performance monitor.

Definition at line 552 of file UT_Performance.h.

int UT_Performance::getNumRecordedTimedFrameEvents ( ) const
inline

FRAME STATISTIC METHODS


Return the number of timed frame events recorded by the performance monitor.

Definition at line 547 of file UT_Performance.h.

virtual void UT_Performance::getObjectPathFromNodeSubclass_ ( OP_Node node,
const char *  event_name,
UT_WorkBuffer object_path 
) const
protectedvirtual

Pass back an object path that can be tied to a UT_PerfMonStats object. The path is generated from the given node and event name.

Reimplemented in MOT_Performance.

virtual void UT_Performance::getObjectPathFromSolverAndNodeSubclass_ ( const SIM_Solver solver,
OP_Node node,
const char *  event_name,
UT_WorkBuffer object_path 
) const
protectedvirtual

Pass back an object path that can be tied to a UT_PerfMonStats object. The path is generated from the given solver, node and event name.

Reimplemented in MOT_Performance.

void UT_Performance::getPerformanceColor ( fpreal  pos,
UT_Color c 
)

Thresholds for displaying various colours in the network editor and in the Spreadsheet.

const UT_PerfMonProfile* UT_Performance::getProfile ( int  profile_id) const

Return the specified profile. (read-only) Return NULL if the requested profile does not exist.

int UT_Performance::getProfileByFilePath ( const char *  file_path) const

Return ID of a loaded profile corresponding to the provided file path. Return UT_PERFMON_INVALID_ID if no such mapping exists.

const UT_Ramp& UT_Performance::getRampColorScheme ( ) const

Return the ramp color scheme used by the performance monitor.

virtual const char* UT_Performance::getStatsIcon ( const UT_PerfMonStats stats) const
virtual

MISCELLANEOUS


Return the icon name to use for the given stats object. Return NULL if there is no known icon to use for the object. Subclasses can override this method to set up their own mappings of stats objects to icons.

Reimplemented in MOT_Performance.

const UT_PerfMonTimedEvent* UT_Performance::getTimedEvent ( int  event_id) const

Return the specified timed event. (read-only) Return NULL if the requested event does not exist or is not a timed event.

fpreal UT_Performance::getTotalRecordedFrameEventMemory ( ) const
inline

Return the total memory accumulation in the frame events recorded by the performance monitor.

Definition at line 562 of file UT_Performance.h.

fpreal UT_Performance::getTotalRecordedFrameEventTime ( ) const
inline

Return the total time spent in the frame events recorded by the performance monitor.

Definition at line 557 of file UT_Performance.h.

bool UT_Performance::hasEventInterest ( void callee,
UT_PerfMonEventCB  callback 
)

Return true if the performance monitor already has the given profile interest. Return false otherwise.

bool UT_Performance::hasProfileInterest ( void callee,
UT_PerfMonProfileEventMethod  callback 
)

Return true if the performance monitor already has the given profile interest. Return false otherwise.

bool UT_Performance::isRecording ( bool  profile_only = false) const
inline

RECORDING METHODS


Return true if the performance monitor is recording Houdini events. When profile_only is enabled, only returns true if the performance monitor is explicitly recording a profile (settings such as getDisplayNodeInfo() still record cook events for the node info window).

Definition at line 462 of file UT_Performance.h.

virtual bool UT_Performance::isRecordingAllowedFor ( OP_Node node) const
virtual

Returns true if the particular node passed is allowed to participate in recording of the statistics, false otherwise. This is currently used for disallowing recording of the contents of compiled nodes.

Reimplemented in MOT_Performance.

bool UT_Performance::isRecordingCookStats ( bool  profile_only = false) const
inline

Return true if Houdini is recording cook stats.

Definition at line 468 of file UT_Performance.h.

bool UT_Performance::isRecordingErrors ( ) const
inline

Return true if Houdini is recording errors.

Definition at line 531 of file UT_Performance.h.

bool UT_Performance::isRecordingFrameStats ( ) const
inline

Return true if Houdini is recording frame stats.

Definition at line 521 of file UT_Performance.h.

bool UT_Performance::isRecordingMemoryStats ( ) const
inline

Return true if Houdini is recording memory stats.

Definition at line 526 of file UT_Performance.h.

bool UT_Performance::isRecordingObjectDrawStats ( ) const
inline

Return true if Houdini is recording object draw stats.

Definition at line 484 of file UT_Performance.h.

bool UT_Performance::isRecordingObjectGPUDrawStats ( ) const
inline

Return true if Houdini is recording object draw stats.

Definition at line 490 of file UT_Performance.h.

bool UT_Performance::isRecordingPaneStats ( ) const
inline

Return true if Houdini is recording pane related stats.

Definition at line 501 of file UT_Performance.h.

bool UT_Performance::isRecordingPDGCookStats ( ) const
inline

Return true if Houdini is recording pdg cook stats.

Definition at line 474 of file UT_Performance.h.

bool UT_Performance::isRecordingRenderStats ( ) const
inline

Return true if Houdini is recording render stats.

Definition at line 511 of file UT_Performance.h.

bool UT_Performance::isRecordingScriptStats ( ) const
inline

Return true if Houdini is recording script stats.

Definition at line 506 of file UT_Performance.h.

bool UT_Performance::isRecordingSolveStats ( ) const
inline

Return true if Houdini is recording simulation solve stats.

Definition at line 479 of file UT_Performance.h.

bool UT_Performance::isRecordingThreadStats ( ) const
inline

Return true if Houdini is recording thread stats.

Definition at line 516 of file UT_Performance.h.

bool UT_Performance::isRecordingViewportStats ( ) const
inline

Return true if Houdini is recording viewport draw stats.

Definition at line 496 of file UT_Performance.h.

int UT_Performance::loadProfile ( const char *  file_path,
UT_StringArray errors 
)

Load a profile from disk. Return the id of the loaded profile. If a profile has already been loaded from the provided file path, remove the existing profile before loading in the new one. Return UT_PERFMON_INVALID_ID if the load failed.

void UT_Performance::loadRampColorScheme ( const char *  str_color_scheme)

Load the ramp color scheme from the given string representation.

void UT_Performance::logMessage ( const char *  message)

Log a generic message event.

int UT_Performance::numCompletedProfiles ( ) const

Return the number of completed profiles that the performance monitor is storing. A completed profile is a profile that is no longer recording events and has generated stats.

void UT_Performance::pauseProfile ( int  profile_id)

Pause the specified profile. Do nothing if the profile does not exist, or if it is not profiling, or if it is already paused.

void UT_Performance::removeAllProfiles ( )

Delete all profiles and unregister them from the performance monitor.

void UT_Performance::removeEventInterest ( void callee,
UT_PerfMonEventCB  callback 
)

Remove an interest for events.

void UT_Performance::removeProfile ( int  profile_id)

Delete the specified profile and unregister it from the performance monitor. Do nothing if the profile does not exist.

void UT_Performance::removeProfileInterest ( void callee,
UT_PerfMonProfileEventMethod  callback 
)

Remove an interest for profile events. Do nothing if the specified interest does not exist.

void UT_Performance::renameProfile ( int  profile_id,
const char *  profile_name 
)

Rename the specified profile.

void UT_Performance::reset ( )

MAINTENANCE


Reset the state of the performance monitor. Reset counters and delete events and profiles. This method should never be called. It is handy for testing purposes.

void UT_Performance::resetCumulativeFrameStats ( )

Reset the performance monitor's accumulated frame statistics.

void UT_Performance::resumeProfile ( int  profile_id)

Resume the specified profile. Do nothing if the profile does not exist, or if it is not profiling, or if it is not paused.

bool UT_Performance::saveProfile ( int  profile_id,
UT_JSONWriter writer 
) const

Save a profile as a JSON using UT_JSONWriter. Return true if the write is successful. Return false otherwise.

bool UT_Performance::saveProfile ( int  profile_id,
const char *  file_path 
)

Return true if the save succeeded. Return false otherwise.

Save a profile to disk. Also update the mapping from file path to profile ID, used to identify if a profile is loaded from the same file

void UT_Performance::saveRampColorScheme ( UT_String str_color_scheme)

Save a representation of the ramp color scheme to the given string.

void UT_Performance::setActiveProfileId ( int  profile_id)

Set the active profile to the given id.

void UT_Performance::setDisplayNodeInfo ( bool  display)

DISPLAY OPTIONS


Toggle whether or not the performance info is displayed in the Node info.

void UT_Performance::setEventExtraInfo ( int  event_id,
const char *  extra_info 
) const

Set extra information that will appear with the event in the stats and event log.

void UT_Performance::setRampColorScheme ( const UT_Ramp src_ramp)

Set the performance monitor's ramp color scheme.

int UT_Performance::startMemoryCookEvent ( int  node_id,
const char *  cook_event_name = NULL 
)
int UT_Performance::startMemoryDrawEvent ( const char *  object,
const char *  draw_event_name,
bool  is_gpu_draw = false 
)
int UT_Performance::startMemoryEvent ( const char *  object,
bool  auto_nest_events = true 
)
int UT_Performance::startMemoryFrameEvent ( fpreal  frame)
int UT_Performance::startMemoryNodeCreationEvent ( )
int UT_Performance::startMemoryNodeScriptEvent ( int  node_id,
const char *  code_description,
UT_PerfMonScriptType  script_type 
)
int UT_Performance::startMemoryPaneEvent ( const char *  pane,
const char *  operation 
)
int UT_Performance::startMemoryPDGEvent ( const char *  path,
const char *  pdg_event_name = NULL 
)
int UT_Performance::startMemoryRenderEvent ( const char *  renderer,
const char *  operation,
bool  is_renderer_a_node,
int  frame_num,
const char *  object = NULL 
)
int UT_Performance::startMemoryScriptEvent ( const char *  code_description,
UT_PerfMonScriptType  script_type,
bool  auto_nest_events = true 
)
int UT_Performance::startMemorySolveEvent ( const SIM_Solver solver,
const char *  solver_event_name = NULL 
)
int UT_Performance::startMemoryViewportDrawEvent ( const char *  viewport_name,
const char *  draw_event_name,
UT_PerfMonViewportType  viewport_type,
bool  is_gpu_draw = false 
)
int UT_Performance::startProfile ( const char *  title,
const UT_PerfMonRecordOptions options = NULL 
)

PROFILE MANAGEMENT


Start a new profile and capture timed and memory events. When the profile is stopped, the events are processed to produce a statistical report. Return the unique id for the new profile.

virtual void UT_Performance::startRemoteListener_ ( )
inlineprotectedvirtual

Start the remote listener to handle incoming information.

Reimplemented in MOT_Performance.

Definition at line 646 of file UT_Performance.h.

virtual int UT_Performance::startTaskScope ( const UT_TaskScope task_scope)
virtual

Start timing the given task scope. Return the id of the event that the task is attached to. Return UT_PERMON_INVALID_ID if no such event exists. This method should only be called in UT_TaskScope's constructor.

int UT_Performance::startTimedCookEvent ( int  node_id,
const char *  cook_event_name = NULL 
)

Start a timed event or memory event for OP cooks. Return the event id, or UT_PERFMON_INVALID_ID if the event was not recorded (i.e. no profile has been started).

int UT_Performance::startTimedDrawEvent ( const char *  object,
const char *  draw_event_name,
bool  is_gpu_draw = false 
)

Start a timed event or memory event for a generic draw event. Set is_gpu_draw to true if the draw event occurred on the GPU. Return the event id, or UT_PERFMON_INVALID_ID if the event was not recorded (i.e. no profile has been started).

int UT_Performance::startTimedEvent ( const char *  event,
const char *  object,
bool  auto_nest_events = true 
)

EVENT MANAGEMENT


Start a generic timed event or memory event. For custom monitoring. Check if there are more specific startTimed*() and startMemory*() methods below that you can call instead before using these methods.

Return the event id, or UT_PERFMON_INVALID_ID if the event was not recorded (i.e. no profile has been started). If auto_nest_events is true, then any other events that are started and stopped before this event is stopped will be treated as dependencies on this event.

int UT_Performance::startTimedFrameEvent ( fpreal  frame)

Start a timed or memory frame event. Return the event id, or UT_PERFMON_INVALID_ID if the event was not recorded.

int UT_Performance::startTimedNodeCreationEvent ( )

These methods start and stop events that are specifically designed to measure the creation of nodes.

int UT_Performance::startTimedNodeScriptEvent ( int  node_id,
const char *  code_description,
UT_PerfMonScriptType  script_type 
)

Similar to startTimedScriptEvent() and startMemoryScriptEvent() but are tied to nodes.

int UT_Performance::startTimedPaneEvent ( const char *  pane,
const char *  operation 
)

Start a timed geometry spreadsheet render event.

int UT_Performance::startTimedPDGEvent ( const char *  path,
const char *  pdg_event_name = NULL 
)

Start a timed event or memory event for PDG work item cooks. Return the event id, or UT_PERFMON_INVALID_ID if the event was not recorded (i.e. no profile has been started).

int UT_Performance::startTimedRenderEvent ( const char *  renderer,
const char *  operation,
bool  is_renderer_a_node,
int  frame_num,
const char *  object = NULL 
)

Start a timed render event or a memory render event. Return the event id, or UT_PERFMON_INVALID_ID if the event was not recorded (i.e. no profile has been started).

int UT_Performance::startTimedScriptEvent ( const char *  code_description,
UT_PerfMonScriptType  script_type,
bool  auto_nest_events = true 
)

Start a timed script event or memory script event. Return the event id, or UT_PERFMON_INVALID_ID if the event was not recorded (i.e. no profile has been started).

int UT_Performance::startTimedSolveEvent ( const SIM_Solver solver,
const char *  solver_event_name = NULL 
)

Start a timed event or memory event for DOP solves. Return the event id, or UT_PERFMON_INVALID_ID if the event was not recorded (i.e. no profile has been started).

int UT_Performance::startTimedViewportDrawEvent ( const char *  viewport_name,
const char *  draw_event_name,
UT_PerfMonViewportType  viewport_type,
bool  is_gpu_draw = false 
)

Start a timed event or memory event for viewport draws. Set is_gpu_draw to true if the draw event occurred on the GPU. Return the event id, or UT_PERFMON_INVALID_ID if the event was not recorded (i.e. no profile has been started).

fpreal UT_Performance::stopEvent ( int  event_id,
bool  return_value = false 
)

Stop a running event. Return the event's (self) value if return_value is set to true. If the event defined by event_id does not exist, or is not running, or if return_value is set to false, then return 0. Note that calculating the event's value can be expensive.

void UT_Performance::stopNodeCreationEvent ( int  event_id,
int  node_id 
)
void UT_Performance::stopProfile ( int  profile_id)

Stop the specified profile. Tabulate timings. Do nothing if the profile does not exist or has already stopped.

virtual void UT_Performance::stopTaskScope ( const UT_TaskScope task_scope,
int  event_id 
)
virtual

Stop timing the given task scope. This method should only be called in UT_TaskScope's destructor.


The documentation for this class was generated from the following file: