Class org.as2lib.test.speed.AbstractTestSuiteResult

org.as2lib.core.BasicClass
   +--org.as2lib.test.speed.AbstractTestResult
      +--org.as2lib.test.speed.AbstractTestSuiteResult

Description

AbstractTestSuiteResult provides implementations of methods needed by implementations of the TestSuiteResult interface.

Field Index

AVERAGE_TIME, METHOD_INVOCATION_COUNT, METHOD_INVOCATION_PERCENTAGE, METHOD_INVOCATION_SUCCESSION, NAME, TIME, TIME_PERCENTAGE

Method Index

addTestResult(), getAllMethodInvocations(), getAverageTime(), getMethodInvocationCount(), getMethodInvocationPercentage(), getTestResultCount(), getTestResults(), hasMethodInvocations(), hasTestResults(), sort()

Inherited from AbstractTestResult

getTimePercentage()

Inherited from BasicClass

toString()

Field Detail

NAME

static public NAME:Number
Sort by name.

TIME

static public TIME:Number
Sort by time.

AVERAGE_TIME

static public AVERAGE_TIME:Number
Sort by average time.

TIME_PERCENTAGE

static public TIME_PERCENTAGE:Number
Sort by time percentage.

METHOD_INVOCATION_COUNT

static public METHOD_INVOCATION_COUNT:Number
Sort by method invocation count.

METHOD_INVOCATION_PERCENTAGE

static public METHOD_INVOCATION_PERCENTAGE:Number
Sort by method invocation percentage.

METHOD_INVOCATION_SUCCESSION

static public METHOD_INVOCATION_SUCCESSION:Number
Sort by the succession of method invocations.

Method Detail

getAverageTime

public function getAverageTime(Void):Number

Returns the time needed per method invocation.

Return

the time needed per method invocation

getAllMethodInvocations

public function getAllMethodInvocations(Void):Array

Returns all profiled method invocations as MethodInvocation instances.

Return

all profiled method invocations as MethodInvocation instances

hasMethodInvocations

public function hasMethodInvocations(Void):Boolean

Returns whether this test suite result has any method invocations.

Return

true if this test suite result has method invocations else false

getMethodInvocationCount

public function getMethodInvocationCount(Void):Number

Returns the total number of method invocations.

Return

the total number of method invocations

getMethodInvocationPercentage

public function getMethodInvocationPercentage(totalMethodInvocationCount:Number):Number

Returns the percentage of method invocations in relation to the passed-in totalMethodInvocationCount.

Parameters

totalMethodInvocationCountthe total number of method invocations to calculate the percentage with

Return

the percentage of method invocations of this result

getTestResults

public function getTestResults(Void):Array

Returns all test results as TestResult instances directly of this test suite.

Return

all test results of this test suite

hasTestResults

public function hasTestResults(Void):Boolean

Returns whether this test suite result has sub-test results.

Return

true if this test suite has sub-test results else false

getTestResultCount

public function getTestResultCount(Void):Number

Returns the number of direct sub-test results.

Return

the number of direct sub-test results

addTestResult

public function addTestResult(testResult:TestResult):Void

Adds a new sub-test result.

If testResult is null or undefined it wll be ignored, this means not added.

Parameters

testResultthe new test result to add

sort

public function sort(property:Number, descending:Boolean):Void

Sorts this test suite result and its sub-test results.

Supported sort properties are:

Parameters

propertythe property to sort by
descendingdetermines whether to sort descending true or ascending false