ジャンプ先: 概要. 戻り値. キーワード. 関連項目. フラグ. MEL 例.
dgtimer [-combineType] [-hide
string] [-hierarchy] [-maxDisplay int] [-name string] [-noHeader] [-outputFile string] [-overhead boolean] [-rangeLower float] [-rangeUpper float] [-reset] [-returnCode
string] [-returnType
string] [-show string]
[-sortMetric string]
[-sortType string] [-threshold float] [-timerOff] [-timerOn]
[-trace boolean] [-type string] [-uniqueName] [-updateHeatMap int]
dgtimer は 「元に戻す」が不可能、「照会」が可能、「編集」が不可能 です。
このコマンドは、ノード単位でタイマーを管理することにより、ディペンデンシー グラフ(DG)ノードのパフォーマンスを計測します。論理的には、各 DG ノードに関連付けられたタイマーがあり、これがプラグ上での各種操作にかかる実時間の合計を記録します。この時間計測は、ノードが起動するエクスプレッションに含まれるエクスプレッションが実行する MEL コマンドのような、操作のためにノードにデータをコピーする損失時間を含みます。また、fileTexture ノードがディスクからイメージ ファイルをロードする場合などの待ち時間も含みます。計算、描画、およびダーティな伝播を含むほぼすべての DG 操作をレポートします。 計測する各種操作を「メトリック」と呼び、タイマーのタイプを「タイマー タイプ」と呼びます。各種メトリックはタイミングがオンであれば必ず計測されますが、-show および -hide フラグで指定した場合のみ照会されます。現時点でサポートしているメトリックを、下記の -show フラグ以下に詳細にリストします。各メトリックで、標準のタイマー タイプ セットを使用できます。これには次の 3 セットがあります。セルフ タイム用の「self」(ノードに限定した時間でノードの子は含まない)、「inclusive」(ノードの子を含む時間)、および「count」(ノード上での指定したメトリックの操作回数)。 dgtimer が使用するタイミングの仕組みは DG 自体に組み込まれているため、すべてのディペンデンシー ノードが計測可能です。OpenMaya API を使ってプラグインを作成する場合、ノード計測のための特別なコードを追加する必要はなく、すべてが透過的に処理されます。 dgtimer コマンドでは、ノード タイマーのオン/オフの切り替え、ゼロ リセット、カレント値の表示が可能です。これらの操作は、すべてのノード上でグローバルに実行することも、名前、タイプ、親子関係で定義された特定のノード セットに実行することもできます。タイマー計測はすべて「リアルタイム」(実時間)で計算されるので、「CPU 時間」(プロセッサがコードを実行している時間のみの計測)とは異なります。時間はすべて秒単位で表示されます。 -query フラグを使用してノード上のカレント タイマー値を表示し、float | デフォルトは、すべてのノードの self 計算時間の合計です。-returnType、-sortMetric、および -sortType フラグにより変更できます。 |
戻り値の型は照会モードでは照会フラグが基になります。
ロング ネーム(ショート ネーム) | 引数型 | プロパティ | ||
---|---|---|---|---|
-combineType(-ct) |
![]() |
|||
|
||||
-hierarchy(-h) |
![]() ![]() |
|||
|
||||
-uniqueName(-un) |
![]() ![]() |
|||
|
||||
-maxDisplay(-m) |
int |
![]() |
||
|
||||
-name(-n) |
string |
![]() ![]() |
||
|
||||
-noHeader(-nh) |
![]() ![]() |
|||
|
||||
-show(-sh) |
string |
![]() ![]() ![]() |
||
|
||||
-hide(-hi) |
string |
![]() ![]() ![]() |
||
|
||||
-overhead(-oh) |
boolean |
![]() ![]() |
||
|
||||
-sortMetric(-sm) |
string |
![]() ![]() |
||
|
||||
-sortType(-st) |
string |
![]() ![]() |
||
|
||||
-timerOff(-off) |
![]() ![]() |
|||
|
||||
-timerOn(-on) |
![]() ![]() |
|||
|
||||
-returnCode(-rc) |
string |
![]() ![]() |
||
|
||||
-returnType(-rt) |
string |
![]() |
||
|
||||
-outputFile(-o) |
string |
![]() |
||
|
||||
-reset(-r) |
![]() |
|||
|
||||
-threshold(-th) |
float |
![]() |
||
|
||||
-trace(-tr) |
boolean |
![]() |
||
|
||||
-type(-t) |
string |
![]() ![]() |
||
|
||||
-updateHeatMap(-uhm) |
int |
![]() |
||
|
||||
-rangeLower(-rgl) |
float |
![]() |
||
|
||||
-rangeUpper(-rgu) |
float |
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
// Turns on node timing and resets the timers. dgtimer -on; // Turns off node timing. Note that this does not reset the // timers. dgtimer -off; // Prints the current timer values to the default (stdout). dgtimer -query; // To reset the timers: dgtimer -reset; // Turn on node timing and reset the timer values to zero. // Then, playback the scene, turn off timing and dump to a file. // Turn on timing without resetting the timers, and repeat. dgtimer -on -reset; play -wait; dgtimer -off; dgtimer -outputFile "/home/virginia/timing/dgtrace_once.txt" -query; dgtimer -on; play -wait; dgtimer -off; dgtimer -outputFile "/home/virginia/timing/dgtrace_twice.txt" -query; // To display the draw and dirty metrics, and sort by inclusive // draw time. dgtimer -show draw -show dirty -sortMetric draw -sortType inclusive -query; // To display the dirty metric, and not show the sort columns (i.e. // percent and cumulative). Note that "-sortType none" internally assumes // self time, and since we don't give a sortMetric, it uses the -show // column. Net effect is sorting on dirty self time. dgtimer -show dirty -sortType none -query;