jp.co.scs.mbench
クラス BenchmarkContainer

java.lang.Object
  上位を拡張 java.lang.Thread
      上位を拡張 jp.co.scs.mbench.BenchmarkContainer
すべての実装されたインタフェース:
java.lang.Runnable
直系の既知のサブクラス:
StubBenchmarkManagerContainer

public class BenchmarkContainer
extends java.lang.Thread

Container for emulating user client.

作成者:
Tetsuro Ikeda, Masato Koga

入れ子のクラスの概要
 
クラス java.lang.Thread から継承された入れ子のクラス/インタフェース
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
フィールドの概要
static java.lang.String[] SYSTEM_LABELS
          default labels
 
クラス java.lang.Thread から継承されたフィールド
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
コンストラクタの概要
BenchmarkContainer(int containerID, BenchmarkInfo info, Synchronizer synchronizer, LogWriter logWriter, DataWriter dataWriter)
          Create a instance of this class
 
メソッドの概要
 void cleanTarget()
          finalizes the benchmark component
 void executeTarget()
          executes the benchmark.
 int getContainerID()
          gets the container ID.
 java.lang.String getCurrentState()
          gets the current state of this container
 DataWriter getDataWriter()
          gets the data writer instance.
 long getEndTime()
          gets the end time of current benchmark iteration.
 long getStartTime()
          gets the start time of current benchmark iteration.
 void initTarget()
          creates the benchmark component instance and initialize it by using benchmark infomation.
 boolean isInitialized()
          gets the flag of if this container is already initialized.
 void run()
          starts the benchmark.
 void setDataWriter(DataWriter dataWriter)
          sets the data writer instance.
 void setInitialized(boolean isInitialized)
          sets the flag of if this container is already initialized.
 void setLogWriter(LogWriter logWriter)
          sets the log writer instance.
 
クラス java.lang.Thread から継承されたメソッド
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

SYSTEM_LABELS

public static final java.lang.String[] SYSTEM_LABELS
default labels

コンストラクタの詳細

BenchmarkContainer

public BenchmarkContainer(int containerID,
                          BenchmarkInfo info,
                          Synchronizer synchronizer,
                          LogWriter logWriter,
                          DataWriter dataWriter)
Create a instance of this class

パラメータ:
containerID - container ID
info - Information of benchmark senario
synchronizer - the object to synchronize each container
logWriter - "log" writer instance
dataWriter - "data" writer instance
メソッドの詳細

getContainerID

public int getContainerID()
gets the container ID.

戻り値:
container ID

setLogWriter

public void setLogWriter(LogWriter logWriter)
sets the log writer instance.

パラメータ:
logWriter - log writer instance

setDataWriter

public void setDataWriter(DataWriter dataWriter)
sets the data writer instance.

パラメータ:
dataWriter - data writer instance.

getDataWriter

public DataWriter getDataWriter()
gets the data writer instance.

戻り値:
data writer instance

getStartTime

public long getStartTime()
gets the start time of current benchmark iteration.

戻り値:
start time

getEndTime

public long getEndTime()
gets the end time of current benchmark iteration.

戻り値:
end time

isInitialized

public boolean isInitialized()
gets the flag of if this container is already initialized.

戻り値:
flag for if this container is already initialized

getCurrentState

public java.lang.String getCurrentState()
gets the current state of this container

戻り値:
current state of this container

setInitialized

public void setInitialized(boolean isInitialized)
sets the flag of if this container is already initialized.

パラメータ:
isInitialized - flag of if this container is already initialized.

initTarget

public void initTarget()
                throws BenchmarkTerminateException
creates the benchmark component instance and initialize it by using benchmark infomation.

例外:
BenchmarkTerminateException - exception for stop whole benchmark

run

public void run()
starts the benchmark.

定義:
インタフェース java.lang.Runnable 内の run
オーバーライド:
クラス java.lang.Thread 内の run

executeTarget

public void executeTarget()
executes the benchmark.

container ID, start time, and end time are recorded at each benchmark iteration.


cleanTarget

public void cleanTarget()
                 throws BenchmarkAbortException
finalizes the benchmark component

例外:
BenchmarkAbortException - exception for stop whole benchmark