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

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

public class PerfResult
extends java.lang.Object

Performance Result class, for storing the information on a single performance page/action result.

The performance result class stores the information for a "unique" page/action and the performance timings gathered. Each individual PerfResult has a set of properties (titles and other identifier information) and a perfTimeList, which is a string of all the performance response times gathered for this particular PerfResult.


Nested Class Summary
static class PerfResult.TimeType
           
 
Constructor Summary
PerfResult(java.lang.String stepName, java.lang.String testName, java.lang.String url, java.lang.String pageTitle, java.lang.String userActionName, PerfManager.RegressionType regressionType, double serverTime, double clientTime, long timeDateStamp)
           
 
Method Summary
 void addResponseTime(double serverTime, double clientTime, long timeDateStamp)
          Add a new response time to the perfTimeList for the perf result
 boolean doesResultMatch(java.lang.String stepNameInput, java.lang.String testNameInput, java.lang.String pageTitleInput, java.lang.String urlInput, java.lang.String userActionNameInput)
          Check if the current result matches the input values.
 java.lang.Double getLastRegressionTime()
          Get the last regression time
 java.lang.String getLastTimeDateStamp()
          Get the last timeDateStamp
 java.lang.String getPageTitle()
          Get the pageTitle
 PerfManager.RegressionType getRegressionType()
          Get the regression type
static double getRegressionValue(double serverTime, double clientTime, PerfManager.RegressionType regType)
          Get the regression value based off the regression type
 java.lang.String getStepName()
          Get the stepName
 java.lang.String getTestName()
          Get the testName
 java.lang.String getUrl()
          Get url
 java.lang.String getUserActionName()
          Get the userActionName
static java.lang.String regressionTypeToString(PerfManager.RegressionType regressionType)
          Returns the regressionType as a string
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerfResult

public PerfResult(java.lang.String stepName,
                  java.lang.String testName,
                  java.lang.String url,
                  java.lang.String pageTitle,
                  java.lang.String userActionName,
                  PerfManager.RegressionType regressionType,
                  double serverTime,
                  double clientTime,
                  long timeDateStamp)
Method Detail

addResponseTime

public void addResponseTime(double serverTime,
                            double clientTime,
                            long timeDateStamp)
Add a new response time to the perfTimeList for the perf result


doesResultMatch

public boolean doesResultMatch(java.lang.String stepNameInput,
                               java.lang.String testNameInput,
                               java.lang.String pageTitleInput,
                               java.lang.String urlInput,
                               java.lang.String userActionNameInput)
Check if the current result matches the input values. This method's logic effectively manages how results are aggregated and matched together. Returns true if the input names match the current result. Returns false if any of the input names do not match the current result.

Parameters:
stepNameInput - : String of the stepName to match.
testNameInput - : String of the testName to match.
pageTitleInput - : String of the pageTitle to match.
urlInput - : String of the url to match.
userActionNameInput - : String of the userActionName to match.
Returns:
The matching results as Boolean.

getLastTimeDateStamp

public java.lang.String getLastTimeDateStamp()
Get the last timeDateStamp

Returns:
The last time/date stamp as String.

getLastRegressionTime

public java.lang.Double getLastRegressionTime()
Get the last regression time

Returns:
The last regression time as Double.

getPageTitle

public java.lang.String getPageTitle()
Get the pageTitle

Returns:
The pageTitle as String.

getRegressionType

public PerfManager.RegressionType getRegressionType()
Get the regression type

Returns:
The regression type as PerfManager.RegressionType.

getRegressionValue

public static double getRegressionValue(double serverTime,
                                        double clientTime,
                                        PerfManager.RegressionType regType)
Get the regression value based off the regression type

Returns:
The regression value as Double.

getStepName

public java.lang.String getStepName()
Get the stepName

Returns:
The stepName as String.

getTestName

public java.lang.String getTestName()
Get the testName

Returns:
The testName as String.

getUrl

public java.lang.String getUrl()
Get url

Returns:
The url as String.

getUserActionName

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

Returns:
The userActionName as String.

regressionTypeToString

public static java.lang.String regressionTypeToString(PerfManager.RegressionType regressionType)
Returns the regressionType as a string

Returns:
The regressionType as String.