com.ibm.team.fvt.tests.performance
Class PerfManager

java.lang.Object
  extended by com.ibm.team.fvt.tests.performance.PerfManager

public class PerfManager
extends java.lang.Object

Performance Manager class, for gathering and storing the information for multiple performance page/action result.

The performance manager class gathers and stores the information for multiple performance results. Gathering of the results is called from a general instrumentation in the ClmWebPage where step, test, and page/element details are recorded along with the response time the action took. All of this data is managed inside of the performance manager class and at the end of the run written out to a csv file.


Nested Class Summary
static class PerfManager.RegressionType
           
 
Field Summary
static boolean PERFORMANCE_ENABLED
           
static int PERFORMANCE_LOOPS
           
static java.lang.String USER_ACTION_NOT_PROVIDED
           
 
Method Summary
 void addPerfResult(java.lang.String pageTitle, java.lang.String url)
          Add a new performance timing result to the PerfManager.
 void close()
          Close the writers
static PerfManager createInstance(WebBrowser browser)
          Create an instance of the performance manager using the given browser.
 void endServerTimer()
          End serverTimer and properly set serverLoadTime to the total time recorded.
 java.lang.String getUserActionName()
          Get the userActionName
 void loadClient()
          Close the writer when writing is complete.
 void reset()
          Reset the user action name, regression type, load times, and timers.
 void resetRegressionType()
          Reset the regression type and clear the lock.
 void setPageLoading(boolean loadingState)
          Set pageLoading to true/false
 void setRegressionType(PerfManager.RegressionType regressionType, boolean override)
          Set the default regression type to provided regressionType.
 void setStepName(java.lang.String currentStepName)
          Set step name to keep track of the current step name.
 void setTestName(java.lang.String currentTestName)
          Set test name to keep track of the current test name.
 void setUserActionName(java.lang.String name)
          Set userActionName to provided name
 void startServerTimer()
          Start serverTimer if page is NOT loading
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_ACTION_NOT_PROVIDED

public static final java.lang.String USER_ACTION_NOT_PROVIDED
See Also:
Constant Field Values

PERFORMANCE_ENABLED

public static final boolean PERFORMANCE_ENABLED

PERFORMANCE_LOOPS

public static final int PERFORMANCE_LOOPS
Method Detail

createInstance

public static PerfManager createInstance(WebBrowser browser)
Create an instance of the performance manager using the given browser.

Warning: this method returns null if the performance are not activated during the scenario execution (see PERFORMANCE_ENABLED).

Parameters:
browser - The browser using the current performance manager
Returns:
The created instance as a PerfManager or null if the performances are not managed during the scenario execution.

addPerfResult

public void addPerfResult(java.lang.String pageTitle,
                          java.lang.String url)
Add a new performance timing result to the PerfManager.


close

public void close()
Close the writers


endServerTimer

public void endServerTimer()
End serverTimer and properly set serverLoadTime to the total time recorded.


getUserActionName

public java.lang.String getUserActionName()
Get the userActionName

Returns:
The userActionName as String.

loadClient

public void loadClient()
Close the writer when writing is complete.


reset

public void reset()
Reset the user action name, regression type, load times, and timers.


resetRegressionType

public void resetRegressionType()
Reset the regression type and clear the lock.


setRegressionType

public void setRegressionType(PerfManager.RegressionType regressionType,
                              boolean override)
Set the default regression type to provided regressionType.

Parameters:
regressionType - : Regression type to apply.
override - : True will override and lock the regression type, while false will only change the regression type if it is not locked.

setPageLoading

public void setPageLoading(boolean loadingState)
Set pageLoading to true/false


setStepName

public void setStepName(java.lang.String currentStepName)
Set step name to keep track of the current step name.


setTestName

public void setTestName(java.lang.String currentTestName)
Set test name to keep track of the current test name.


setUserActionName

public void setUserActionName(java.lang.String name)
Set userActionName to provided name


startServerTimer

public void startServerTimer()
Start serverTimer if page is NOT loading