The profiler is used to record timing information from key events within Maya, as an aid in tuning the performance of scenes, scripts and plug-ins. User written plug-ins and Python scripts can also generate profiling information for their own code through the MProfilingScope and MProfiler classes in the API. This command provides the ability to control the collection of profiling data and to query information about the recorded events. The recorded information can also be viewed graphically in the Profiler window. The buffer size cannot be changed while sampling is active, it will return an error The reset flag cannot be called while sampling is active, it will return an error. Any changes to the buffer size will only be applied on start of the next recording. You can’t save and load in the same command, save has priority, load would be ignored. In query mode, return type is based on queried flag.
Flags:
Long Name / Short Name | Argument Types | Properties | |
---|---|---|---|
addCategory / a | unicode | ![]() |
|
|
|||
allCategories / ac | bool | ![]() |
|
|
|||
bufferSize / b | int | ![]() ![]() |
|
Toggled : change the buffer size to fit the specified number of events (requires that sampling is off) Query : return the current buffer size The new buffer size will only take effect when next sampling starts. When the buffer is full, the recording stops. |
|||
categoryIndex / ci | int | ![]() ![]() |
|
|
|||
categoryIndexToName / cin | int | ![]() ![]() |
|
|
|||
categoryName / cn | unicode | ![]() |
|
|
|||
categoryNameToIndex / cni | unicode | ![]() ![]() |
|
|
|||
categoryRecording / cr | bool | ![]() ![]() |
|
Toggled : Enable/disable the recording of the category. Query : return if the recording of the category is On. Requires the -categoryIndex or -categoryName flag to specify the category to be queried. |
|||
clearAllMelInstrumentation / cam | bool | ![]() |
|
|
|||
colorIndex / coi | int | ![]() |
|
|
|||
eventCPUId / eci | bool | ![]() |
|
|
|||
eventCategory / eca | bool | ![]() |
|
|
|||
eventColor / eco | bool | ![]() |
|
|
|||
eventCount / ec | bool | ![]() |
|
|
|||
eventDescription / ed | bool | ![]() |
|
|
|||
eventDuration / edu | bool | ![]() |
|
Query the duration of the event at the given index, the time unit is microsecond. Note that a signal event has a 0 duration. Requires the -eventIndex flag to specify the event to be queried. |
|||
eventIndex / ei | int | ![]() |
|
|
|||
eventName / en | bool | ![]() |
|
|
|||
eventStartTime / et | bool | ![]() |
|
|
|||
eventThreadId / eti | bool | ![]() |
|
|
|||
instrumentMel / instrumentMel | bool | ![]() |
|
Enable/Diable the instrumentation of a MEL command or procedure. When the instrumentation is enabled, the execution of MEL command or procedure can be profiled and shown in the Profiler window. To enable the instrumentation requires the -procedureName, -colorIndex and -categoryIndex flags. To disable the instrumentation requires the -procedureName flag. |
|||
load / l | unicode | ![]() ![]() |
|
|
|||
output / o | unicode | ![]() ![]() |
|
|
|||
procedureDescription / pd | unicode | ![]() |
|
Used with -instrumentMel trueto provide a description of the MEL command or procedure being instrumented. This description can be viewed in the Profiler Tool window. |
|||
procedureName / pn | unicode | ![]() |
|
|
|||
removeCategory / rc | unicode | ![]() |
|
|
|||
reset / r | bool | ![]() ![]() |
|
|
|||
sampling / s | bool | ![]() ![]() |
|
|
|||
signalEvent / sig | bool | ![]() |
|
Query if the event at the given index is a signal event. Requires the -eventIndex flag to specify the event to be queried. A Signal Event only remembers the start moment and has no knowledge about duration. It can be used in cases when the user does not care about the duration but only cares if this event does happen. |
|||
signalMelEvent / sim | bool | ![]() |
|
Used with -instrumentMel true, inform profiler that this instrumented MEL command or procedure will be taken as a signal event during profiling. A Signal Event only remembers the start moment and has no knowledge about duration. It can be used in cases when the user does not care about the duration but only cares if this event does happen. |
Derived from mel command maya.cmds.profiler