com.sun.faban.harness.common
Class Run

java.lang.Object
  extended by com.sun.faban.harness.common.Run
All Implemented Interfaces:
Serializable

public class Run
extends Object
implements Serializable

This is the benchmark run object. The run can either be in the RunQ (before it executes) or in the output directory when and after it finishes executing. This class keeps track of the various files in a run. An object of this class is created by the Engine and passed as a a parameter to the various services and benchmark code.

Author:
Ramesh Ramachandran
See Also:
Serialized Form

Field Summary
static int COMPLETED
          Run status COMPLETED.
static int FAILED
          Run status FAILED.
static int KILLED
          Run status KILLED.
static int RECEIVED
          Run status RECEIVED.
static int STARTED
          Run status STARTED.
static String[] STATUS_MESSAGE
          The status messages for each status.
 
Constructor Summary
Run(String runSeq, BenchmarkDescription benchDesc)
          Construcs a run object.
 
Method Summary
 BenchmarkDescription getBenchDesc()
          Obtains the benchmark description.
 String getBenchmarkName()
          Obtains the short name of the benchmark run.
 String getLog()
          Get pathname of log for this run.
 String getOutDir()
          Get output directory pathname.
 String getParamFile()
          Get full pathname of ParamRepository for this run This method checks in the run is in the RunQ or output directories, and returns the appropriate path.
 String getRunId()
          Get the id of this run.
 String getRunSeq()
          Get the sequence of the run.
 void updateStatus(int status)
          Updates the run status in the result info file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STARTED

public static final int STARTED
Run status STARTED.

See Also:
Constant Field Values

RECEIVED

public static final int RECEIVED
Run status RECEIVED.

See Also:
Constant Field Values

COMPLETED

public static final int COMPLETED
Run status COMPLETED.

See Also:
Constant Field Values

FAILED

public static final int FAILED
Run status FAILED.

See Also:
Constant Field Values

KILLED

public static final int KILLED
Run status KILLED.

See Also:
Constant Field Values

STATUS_MESSAGE

public static final String[] STATUS_MESSAGE
The status messages for each status.

Constructor Detail

Run

public Run(String runSeq,
           BenchmarkDescription benchDesc)
Construcs a run object.

Parameters:
runSeq - The sequence number
benchDesc - The benchmark description
Method Detail

getRunSeq

public String getRunSeq()
Get the sequence of the run.

Returns:
The run sequence number

getRunId

public String getRunId()
Get the id of this run.

Returns:
The full run id of this run

getBenchmarkName

public String getBenchmarkName()
Obtains the short name of the benchmark run.

Returns:
The benchmark's short name

getBenchDesc

public BenchmarkDescription getBenchDesc()
Obtains the benchmark description.

Returns:
The benchmark description

getLog

public String getLog()
Get pathname of log for this run.

Returns:
The log file path name

getParamFile

public String getParamFile()
Get full pathname of ParamRepository for this run This method checks in the run is in the RunQ or output directories, and returns the appropriate path.

Returns:
The full path to the run config file

getOutDir

public String getOutDir()
Get output directory pathname.

Returns:
The path name of the run output directory

updateStatus

public void updateStatus(int status)
                  throws IOException
Updates the run status in the result info file.

Parameters:
status - The new run status
Throws:
IOException - If the update fails