Note that all methods in this class may raise an hou.OperationFailed exception if the event was not actually recorded in the Performance Monitor. This can happen if hou.perfMon.startEvent or hou.perfMon.startCookEvent was called when the Performance Monitor was not recording.
Note
HOM performance monitor submodules, classes and methods report time and memory statistics in milliseconds and bytes respectively.
Note
The stopTime(), memory() and time() methods have been removed. Memory and time values are now returned by the stop() method.
Methods ¶
id()
→ int
Return the event’s unique identifier which is used internally by the performance monitor.
This method is deprecated.
isAutoNestEnabled()
→ bool
Return True if the event will automatically 'nest' other events that are started and stopped while this event is running. When the event is stopped, it will decrement the times and memory of its nested events from its total time and memory. That way, the event’s total time and memory will reflect the work performed in the event itself and not in any of its nested events.
isRunning()
→ bool
Return true if the event is running, that is, if the event has been started but not stopped.
isTiming()
→ bool
This method is deprecated in favor of isRunning
.
name()
→ str
Return the event name.
This method is deprecated.
object()
→ str
Return the object that the event applies to. Return None if the event is not associated with an object.
startTime()
→ float
Return the start time of the event in milliseconds since the epoch date.
Raises hou.OperationFailed if the event does not contain any time data. This can happen if the event was started when the Performance Monitor was not recording any time statistics.
stop()
Stop the event timer and return a 2-tuple, (<time>, <memory>), containing the event’s elapsed time and memory growth.
The elapsed time is the number of milliseconds that the event was timing for. The memory growth is the increase in memory usage by Houdini (in bytes) from when the event started and when it stopped.
If the event was not recording memory, then the returned memory value is 0.0. Likewise, if the event was not recording time, then the returned time value is 0.0.
Raises hou.OperationFailed if the event is already stopped.
See also |