|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjp.ne.mki.wedge.education.hooker.CoverageAnalyzer
public class CoverageAnalyzer
全ての実行リストに対して網羅性と実行時間を分析するExecuteHooker。
RunClient設定ファイルにExecuteHookerとして登録すると、 下記のものを記録します。
Frame終了後にこれらをファイルにTab区切りで出力します。
出力するファイル名は「コマンドライン引数」に「-このClassのClass名」をKeyにして定義します。
実際出力するファイル名は指定されたファイル名に
「Frame名称」「Frame実行開始時刻」「拡張子(.log)」
を付加したファイル名が使用されます。
例)-jp.ne.mki.wedge.education.hooker=logs/coverage
logsフォルダ内に「logs/coverage.myframe.10000000.log」
のようなファイル名で出力されます。
コマンドライン引数に指定が無い場合は標準出力に出力されます。
このSampleの場合は構造に対応していないため、
構造ロジッククラス(ExecuteAfter系やIfElseなど)の場合は
Treeの子要素となる処理ブロックも込みの実行時間が計上される点に注意してください。
また、Vf本体とは別Threadで実行されるものについては
実行時間は正しい値が記録できません。
フィールドの概要 | |
---|---|
protected long |
afterMillisecond
実行後のSystem,currentTimeMillis() |
protected long |
beforeMillisecond
実行前のSystem,currentTimeMillis() |
protected java.util.Map<ExecutionInterface,java.lang.Integer> |
coverageMap
特定のExecutionInterfaceが何回実行されたか。 |
protected java.lang.String |
frameName
Frameの名称。 |
protected boolean |
initialized
初期化済みかどうか。 |
protected java.util.Map<ExecutionInterface,java.lang.String> |
keyMap
特定のExecutionInterfaceの名称 (TreePathのような、人間で判断できるもの)。 |
protected java.util.Map<ExecutionInterface,java.lang.Long> |
millisecondMap
特定のExecutionInterfaceが使用した実行時間(ms)。 |
protected java.lang.String |
startTime
Frame起動時のTimestamp。 |
コンストラクタの概要 | |
---|---|
CoverageAnalyzer()
|
メソッドの概要 | |
---|---|
protected void |
addMap(java.util.List<ExecutionInterface> executions,
java.lang.String key)
|
protected void |
createMap(ClientManagerInterface manager)
全ての実行ListをListupする。 |
void |
executeAfter(ExecutionInterface execution,
int index,
int resultCode)
処理開始後 |
void |
executeBefore(ExecutionInterface execution,
int index,
int skipCount)
処理開始前 |
protected void |
incrementCounter(ExecutionInterface execution)
実行された回数として1加算する。 |
protected void |
log(java.util.logging.Level level,
java.lang.String message)
|
protected void |
save()
結果を出力する。 |
void |
startUp(ExecutionListInterface executionList,
javax.swing.JComponent comp,
ClientManagerInterface manager)
実行リスト開始時 |
void |
tearDown(ExecutionListInterface executionList,
int result,
ClientManagerInterface manager)
実行リスト終了時 |
protected void |
terminate()
|
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
protected java.util.Map<ExecutionInterface,java.lang.String> keyMap
protected java.util.Map<ExecutionInterface,java.lang.Integer> coverageMap
protected java.util.Map<ExecutionInterface,java.lang.Long> millisecondMap
protected java.lang.String frameName
protected boolean initialized
protected long beforeMillisecond
protected long afterMillisecond
protected java.lang.String startTime
コンストラクタの詳細 |
---|
public CoverageAnalyzer()
メソッドの詳細 |
---|
public void executeAfter(ExecutionInterface execution, int index, int resultCode)
execution
- 実行オブジェクトindex
- 実行時のインデックスresultCode
- 戻り値public void executeBefore(ExecutionInterface execution, int index, int skipCount)
execution
- 実行オブジェクトindex
- 実行時のインデックスskipCount
- Skip数protected void incrementCounter(ExecutionInterface execution)
execution
- public void startUp(ExecutionListInterface executionList, javax.swing.JComponent comp, ClientManagerInterface manager)
executions
- 実行リストcurrentComp
- 処理中のコンポーネントmanager
- Managerpublic void tearDown(ExecutionListInterface executionList, int result, ClientManagerInterface manager)
executions
- 実行リストresult
- 戻り値manager
- protected void save() throws java.io.IOException
java.io.IOException
protected void createMap(ClientManagerInterface manager)
manager
- protected void terminate()
protected void addMap(java.util.List<ExecutionInterface> executions, java.lang.String key)
protected void log(java.util.logging.Level level, java.lang.String message)
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |