|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.faban.driver.DriverContext com.sun.faban.driver.engine.NullContext
public class NullContext
The null context is used for testing driver code for the Faban driver framework without actually running the agents. It ensures that the same driver code can be tested in it's own main method.
Constructor Summary | |
---|---|
NullContext()
|
Method Summary | |
---|---|
void |
attachMetrics(CustomMetrics metrics)
Attaches a custom metrics as the miscellaneous stats. |
void |
attachMetrics(String name,
CustomMetrics metrics)
Attaches a custom metrics object to the primary metrics, given a name or description. |
void |
attachMetrics(String name,
CustomTableMetrics metrics)
Attaches a custom table metrics object to the primary metrics, given a name or description. |
int |
getAgentId()
Obtains the agent id. |
String |
getBaseDir()
Obtains the base directory where the benchmark currently being run is installed. |
int |
getClientsInAgent()
Obtains the number of client threads in this agent. |
int |
getClientsInDriver()
Obtains the total number of clients threads for this driver. |
String |
getCurrentOperation()
Returns the current operation. |
String |
getDriverName()
Returns the driver name. |
Logger |
getLogger()
Obtains the logger for this driver thread. |
long |
getNanoTime()
Obtain the current nano time offset from the base time. |
int |
getOperationCount()
Gets the current count of the operations done by this thread. |
int |
getOperationId()
Obtains the operation id of the current operation. |
Element |
getPropertiesNode()
Gets the properties node from the dom tree. |
String |
getProperty(String name)
Gets the driver property. |
String[] |
getPropertyValues(String name)
Gets the driver properties by name. |
int |
getRampDown()
Obtains the ramp down time. |
int |
getRampUp()
Obtains the rampup time. |
Random |
getRandom()
Obtains the random value generator for this thread. |
String |
getResourceDir()
Obtains the resource directory used for this benchmark, if exists. |
int |
getScale()
Obtains the scale of this run. |
int |
getSteadyState()
Obtains the steady state time. |
int |
getSteadyStateStart()
Obtains the relative time steady state starts. |
long |
getSteadyStateStartNanos()
Obtain the nano time offset where steady state starts. |
int |
getThreadId()
Obtains the current thread id. |
int |
getTime()
Obtains the relative current time. |
String |
getXPathValue(String xPath)
Returns a value matching the given xpath in the configuration file. |
boolean |
isTxSteadyState()
Checks whether we're in the steady state. |
void |
pauseTime()
Pauses the time measurement. |
void |
recordTime()
Records the start and end of time measurement. |
void |
resetMix()
Resets the mix. |
Methods inherited from class com.sun.faban.driver.DriverContext |
---|
getContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NullContext()
Method Detail |
---|
public int getScale()
getScale
in class DriverContext
DriverContext.getScale()
public int getClientsInAgent()
getClientsInAgent
in class DriverContext
public int getClientsInDriver()
getClientsInDriver
in class DriverContext
public int getThreadId()
getThreadId
in class DriverContext
DriverContext.getThreadId()
public int getAgentId()
getAgentId
in class DriverContext
DriverContext.getAgentId()
public String getDriverName()
getDriverName
in class DriverContext
DriverContext.getDriverName()
public Logger getLogger()
getLogger
in class DriverContext
DriverContext.getLogger()
public void attachMetrics(CustomMetrics metrics)
attachMetrics
in class DriverContext
metrics
- The metrics to attachDriverContext.attachMetrics(com.sun.faban.driver.CustomMetrics)
public void attachMetrics(String name, CustomMetrics metrics)
attachMetrics
in class DriverContext
name
- The name or description of this metricsmetrics
- The custom metrics to be replacedpublic void attachMetrics(String name, CustomTableMetrics metrics)
attachMetrics
in class DriverContext
name
- The name or description of this metricsmetrics
- The custom table metrics to be replacedpublic String getCurrentOperation()
getCurrentOperation
in class DriverContext
DriverContext.getCurrentOperation()
public int getOperationId()
getOperationId
in class DriverContext
DriverContext.getOperationId()
public int getOperationCount()
getOperationCount
in class DriverContext
DriverContext.getOperationCount()
public Random getRandom()
getRandom
in class DriverContext
DriverContext.getRandom()
public void recordTime()
recordTime
in class DriverContext
DriverContext.recordTime()
public void pauseTime()
pauseTime
in class DriverContext
DriverContext.pauseTime()
public int getTime()
getTime
in class DriverContext
DriverContext.getTime()
public int getSteadyStateStart()
getSteadyStateStart
in class DriverContext
DriverContext.getSteadyStateStart()
public long getNanoTime()
getNanoTime
in class DriverContext
DriverContext.getNanoTime()
public long getSteadyStateStartNanos()
getSteadyStateStartNanos
in class DriverContext
DriverContext.getSteadyStateStartNanos()
public int getRampUp()
getRampUp
in class DriverContext
DriverContext.getRampUp()
public int getSteadyState()
getSteadyState
in class DriverContext
DriverContext.getSteadyState()
public int getRampDown()
getRampDown
in class DriverContext
DriverContext.getRampDown()
public void resetMix()
resetMix
in class DriverContext
DriverContext.resetMix()
public boolean isTxSteadyState()
isTxSteadyState
in class DriverContext
DriverContext.isTxSteadyState()
public String getProperty(String name)
getProperty
in class DriverContext
name
- The name of the property
DriverContext.getProperty(java.lang.String)
public String[] getPropertyValues(String name)
getPropertyValues
in class DriverContext
name
- The name of the property
DriverContext.getPropertyValues(java.lang.String)
public Element getPropertiesNode()
getPropertiesNode
in class DriverContext
DriverContext.getPropertiesNode()
public String getXPathValue(String xPath)
getXPathValue
in class DriverContext
xPath
- The xpath
DriverContext.getXPathValue(java.lang.String)
public String getBaseDir()
getBaseDir
in class DriverContext
public String getResourceDir()
getResourceDir
in class DriverContext
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |