|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.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 DriverContextDriverContext.getScale()public int getClientsInAgent()
getClientsInAgent in class DriverContextpublic int getClientsInDriver()
getClientsInDriver in class DriverContextpublic int getThreadId()
getThreadId in class DriverContextDriverContext.getThreadId()public int getAgentId()
getAgentId in class DriverContextDriverContext.getAgentId()public String getDriverName()
getDriverName in class DriverContextDriverContext.getDriverName()public Logger getLogger()
getLogger in class DriverContextDriverContext.getLogger()public void attachMetrics(CustomMetrics metrics)
attachMetrics in class DriverContextmetrics - The metrics to attachDriverContext.attachMetrics(com.sun.faban.driver.CustomMetrics)
public void attachMetrics(String name,
CustomMetrics metrics)
attachMetrics in class DriverContextname - The name or description of this metricsmetrics - The custom metrics to be replaced
public void attachMetrics(String name,
CustomTableMetrics metrics)
attachMetrics in class DriverContextname - The name or description of this metricsmetrics - The custom table metrics to be replacedpublic String getCurrentOperation()
getCurrentOperation in class DriverContextDriverContext.getCurrentOperation()public int getOperationId()
getOperationId in class DriverContextDriverContext.getOperationId()public int getOperationCount()
getOperationCount in class DriverContextDriverContext.getOperationCount()public Random getRandom()
getRandom in class DriverContextDriverContext.getRandom()public void recordTime()
recordTime in class DriverContextDriverContext.recordTime()public void pauseTime()
pauseTime in class DriverContextDriverContext.pauseTime()public int getTime()
getTime in class DriverContextDriverContext.getTime()public int getSteadyStateStart()
getSteadyStateStart in class DriverContextDriverContext.getSteadyStateStart()public long getNanoTime()
getNanoTime in class DriverContextDriverContext.getNanoTime()public long getSteadyStateStartNanos()
getSteadyStateStartNanos in class DriverContextDriverContext.getSteadyStateStartNanos()public int getRampUp()
getRampUp in class DriverContextDriverContext.getRampUp()public int getSteadyState()
getSteadyState in class DriverContextDriverContext.getSteadyState()public int getRampDown()
getRampDown in class DriverContextDriverContext.getRampDown()public void resetMix()
resetMix in class DriverContextDriverContext.resetMix()public boolean isTxSteadyState()
isTxSteadyState in class DriverContextDriverContext.isTxSteadyState()public String getProperty(String name)
getProperty in class DriverContextname - The name of the property
DriverContext.getProperty(java.lang.String)public String[] getPropertyValues(String name)
getPropertyValues in class DriverContextname - The name of the property
DriverContext.getPropertyValues(java.lang.String)public Element getPropertiesNode()
getPropertiesNode in class DriverContextDriverContext.getPropertiesNode()public String getXPathValue(String xPath)
getXPathValue in class DriverContextxPath - The xpath
DriverContext.getXPathValue(java.lang.String)public String getBaseDir()
getBaseDir in class DriverContextpublic String getResourceDir()
getResourceDir in class DriverContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||