ジャンプ先: 概要. 戻り値. キーワード. 関連. フラグ. MEL 例.
profiler [-addCategory string] [-allCategories] [-bufferSize int] [-categoryIndex int] [-categoryIndexToName int] [-categoryName string] [-categoryNameToIndex string] [-categoryRecording boolean] [-clearAllMelInstrumentation] [-colorIndex int] [-eventCPUId] [-eventCategory] [-eventColor] [-eventCount] [-eventDescription] [-eventDuration] [-eventIndex int] [-eventName] [-eventStartTime] [-eventThreadId] [-instrumentMel boolean] [-load string] [-output string] [-procedureDescription string] [-procedureName string] [-removeCategory string] [-reset] [-sampling boolean] [-signalEvent] [-signalMelEvent boolean]
profiler は、取り消し不可能、照会可能、および編集不可能です。
プロファイラは、シーン、スクリプト、およびプラグインのパフォーマンスを調整するための補助として、Maya のキー イベントからタイミング情報を記録するために使用されます。ユーザ記述のプラグインと Python スクリプトにより、API の MProfilingScope および MProfiler クラスを使用して、ユーザ独自のコードのためのプロファイリング情報を生成することもできます。 このコマンドには、プロファイリング データのコレクションをコントロールしたり、記録されたイベントに関する情報を照会したりするための機能があります。また、記録された情報は、[プロファイラ]ウィンドウでグラフィカルに表示することができます。 サンプリングがアクティブな場合はバッファ サイズを変更することはできず、エラーが返されます。サンプリングがアクティブな場合はリセット フラグをコールすることはできず、エラーが返されます。バッファ サイズに対するすべての変更は、次の記録の開始時に適用されます。同一のコマンドで保存とロードを行うことはできません。保存が優先されるため、ロードは無視されます。なし
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
-sampling(-s)
|
boolean
|
![]() ![]() |
||
|
||||
-output(-o)
|
string
|
![]() ![]() |
||
|
||||
-load(-l)
|
string
|
![]() ![]() |
||
|
||||
-reset(-r)
|
|
![]() ![]() |
||
|
||||
-bufferSize(-b)
|
int
|
![]() ![]() |
||
|
||||
-addCategory(-a)
|
string
|
![]() |
||
|
||||
-removeCategory(-rc)
|
string
|
![]() |
||
|
||||
-allCategories(-ac)
|
|
![]() |
||
|
||||
-categoryNameToIndex(-cni)
|
string
|
![]() ![]() |
||
|
||||
-categoryIndexToName(-cin)
|
int
|
![]() ![]() |
||
|
||||
-categoryIndex(-ci)
|
int
|
![]() ![]() |
||
|
||||
-categoryName(-cn)
|
string
|
![]() |
||
|
||||
-categoryRecording(-cr)
|
boolean
|
![]() ![]() |
||
|
||||
-eventCount(-ec)
|
|
![]() |
||
|
||||
-eventIndex(-ei)
|
int
|
![]() |
||
|
||||
-eventStartTime(-et)
|
|
![]() |
||
|
||||
-eventDuration(-edu)
|
|
![]() |
||
|
||||
-eventName(-en)
|
|
![]() |
||
|
||||
-eventDescription(-ed)
|
|
![]() |
||
|
||||
-eventCategory(-eca)
|
|
![]() |
||
|
||||
-eventColor(-eco)
|
|
![]() |
||
|
||||
-eventThreadId(-eti)
|
|
![]() |
||
|
||||
-eventCPUId(-eci)
|
|
![]() |
||
|
||||
-signalEvent(-sig)
|
|
![]() |
||
|
||||
-instrumentMel(-in)
|
boolean
|
![]() |
||
|
||||
-colorIndex(-coi)
|
int
|
![]() |
||
|
||||
-procedureName(-pn)
|
string
|
![]() |
||
|
||||
-procedureDescription(-pd)
|
string
|
![]() |
||
|
||||
-signalMelEvent(-sim)
|
boolean
|
![]() |
||
|
||||
-clearAllMelInstrumentation(-cam)
|
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
//Start profiling profiler -sampling true; //Wait for events to be profiled //Stop profiling profiler -sampling false; //Output the result to a file profiler -output "test.txt"; //Load a recording from a file to the buffer profiler -load "test.txt"; //Reset the tool profiler -reset; //Set the profiler's buffer size to fit 5 megaBytes profiler -bufferSize 5; //Query the profiler's buffer size profiler -query -bufferSize; //Add a new category profiler -addCategory "Test Category"; //Remove an existing category profiler -removeCategory "Test Category"; //Query the index of the category with the given name profiler -query -categoryNameToIndex "Maya Qt" ; //Query the name of the category at the given index profiler -query -categoryIndexToName 5 ; //Query if it is enabled for the recording of the category at the given index profiler -query -categoryRecording -categoryIndex 5; //Query if it is enabled for the recording of the category with the given name profiler -query -categoryRecording -categoryName "Maya Qt"; //Enable/Disable the recording of the category at the given index profiler -categoryIndex 5 -categoryRecording false; profiler -categoryIndex 5 -categoryRecording true; //Query the number of the events in the buffer profiler -query -eventCount; //Query the time at which the event at the given index start profiler -query -eventStartTime -eventIndex 100; //Query the duration of the event at the given index profiler -query -eventDuration -eventIndex 100; //Query the name of the event at the given index profiler -query -eventName -eventIndex 100; //Query the description of the event at the given index profiler -query -eventDescription -eventIndex 100; //Query the category the the event at the given index belongs to profiler -query -eventCategory -eventIndex 100; //Query the color of the event at the given index profiler -query -eventColor -eventIndex 100; //Query the thread ID of the event at the given index profiler -query -eventThreadId -eventIndex 100; //Query the CPU ID of the event at the given index profiler -query -eventCPUId -eventIndex 100; //Query if the event at the given index is a signal event profiler -query -signalEvent -eventIndex 100; //Instrument a MEL command or procedure //Given a MEL procedure which calculate factorial, it will be instrumented //and profiled proc int Factorial(int $limit) { int $result = 1; for( $i=1; $i<=$limit; ++$i) { $result = $result * $i; } return $result; } // Add a new category for MEL Scripts int $melCategoryIndex = `profiler -addCategory "MEL Scripts"`; //Instrument a MEL command profiler -instrumentMel true -procedureName "deviceManager" -categoryIndex $melCategoryIndex -colorIndex 2 -procedureDescription "deviceManagerDesc"; //Instrument a MEL procedure as a signal event profiler -instrumentMel true -procedureName "Factorial" -categoryIndex $melCategoryIndex -colorIndex 8 -procedureDescription "FactorialDesc" -signalMelEvent true; //Profiler the MEL procedure and command. profiler -s true; Factorial(5); deviceManager -query -numDevices; profiler -s false; // Remove the instrumentation of the MEL command and procedure profiler -instrumentMel false -procedureName "deviceManager"; profiler -instrumentMel false -procedureName "Factorial";