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

#include <MOT_Performance.h>

+ Inheritance diagram for MOT_Performance:

Public Member Functions

 MOT_Performance ()
 
 ~MOT_Performance () override
 
const char * getStatsIcon (const UT_PerfMonStats *stats) const override
 
bool isRecordingAllowedFor (OP_Node *node) const override
 
- Public Member Functions inherited from NET_Performance
 NET_Performance ()
 
void closeListener ()
 
int getEventListenPort () const override
 
- Public Member Functions inherited from UT_Performance
 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
 
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...
 
int getNumRecordedTimedFrameEvents () const
 
int getNumRecordedMemoryFrameEvents () const
 
fpreal getTotalRecordedFrameEventTime () const
 
fpreal getTotalRecordedFrameEventMemory () const
 
void resetCumulativeFrameStats ()
 Reset the performance monitor's accumulated frame statistics. More...
 
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

int getCurrentFrameSubclass_ () override
 Return the current frame. More...
 
OP_NodegetNodeSubclass_ (int node_id) const override
 Return a pointer to the node specified by the given id. More...
 
OP_NodegetNodeFromSolverSubclass_ (const SIM_Solver *solver) const override
 Return a pointer to the node that is bound to the given SIM solver. More...
 
void getObjectPathFromNodeSubclass_ (OP_Node *node, const char *event_name, UT_WorkBuffer &object_path) const override
 
void getObjectPathFromSolverAndNodeSubclass_ (const SIM_Solver *solver, OP_Node *node, const char *event_name, UT_WorkBuffer &object_path) const override
 
void getExtraInfoFromNodeSubclass_ (OP_Node *node, UT_WorkBuffer &extra_info) const override
 
void startRemoteListener_ () override
 Start the remote listener. More...
 
- Protected Member Functions inherited from NET_Performance
void startListener_ (ASIO_IOContext::executor_type exc)
 

Detailed Description

Definition at line 23 of file MOT_Performance.h.

Constructor & Destructor Documentation

MOT_Performance::MOT_Performance ( )
MOT_Performance::~MOT_Performance ( )
override

Member Function Documentation

int MOT_Performance::getCurrentFrameSubclass_ ( )
overrideprotectedvirtual

Return the current frame.

Reimplemented from UT_Performance.

void MOT_Performance::getExtraInfoFromNodeSubclass_ ( OP_Node node,
UT_WorkBuffer extra_info 
) const
overrideprotectedvirtual

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

Reimplemented from UT_Performance.

OP_Node* MOT_Performance::getNodeFromSolverSubclass_ ( const SIM_Solver solver) const
overrideprotectedvirtual

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

Reimplemented from UT_Performance.

OP_Node* MOT_Performance::getNodeSubclass_ ( int  node_id) const
overrideprotectedvirtual

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

Reimplemented from UT_Performance.

void MOT_Performance::getObjectPathFromNodeSubclass_ ( OP_Node node,
const char *  event_name,
UT_WorkBuffer object_path 
) const
overrideprotectedvirtual

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 from UT_Performance.

void MOT_Performance::getObjectPathFromSolverAndNodeSubclass_ ( const SIM_Solver solver,
OP_Node node,
const char *  event_name,
UT_WorkBuffer object_path 
) const
overrideprotectedvirtual

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 from UT_Performance.

const char* MOT_Performance::getStatsIcon ( const UT_PerfMonStats stats) const
overridevirtual

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 from UT_Performance.

bool MOT_Performance::isRecordingAllowedFor ( OP_Node node) const
overridevirtual

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 from UT_Performance.

void MOT_Performance::startRemoteListener_ ( )
overrideprotectedvirtual

Start the remote listener.

Reimplemented from UT_Performance.


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