IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.kernel.services
Interface IStatisticsManager


public interface IStatisticsManager

The IStatisticsManager interface provides access to statistical counters for users of ICustomCode2.

Statistical counters are stored in a hierarchy of counters. Periodically, all counter values in the tree are reported to the performance testing workbench and collected into performance test run results where they are available for use in reports and graphs. Each counter in the tree has a type. See StatType. The operations that are available on a counter depend on the counter's type.


Field Summary
static int ALL
          Reports all statistical counters.
static int NONE
          Reports no statistics.
static int PRIMARY_COUNTERS
          Reports a moderate number of statistical counters.
static int PRIMARY_TEST_ACTIONS
          Reports a moderate number of statistical counters.
static int SCHEDULE_ACTIONS
          Reports only those statistical counters associated with the schedule.
static int SECONDARY_TEST_ACTIONS
          Reports a large number of statistical counters.
 
Method Summary
 com.ibm.rational.test.lt.kernel.statistics.impl.Average getAverage(String[] path)
          Retrieves a child Average counter.
 int getLevel()
          Returns the current level of statistics verbosity.
 com.ibm.rational.test.lt.kernel.statistics.impl.Range getRange(String[] path)
          Retrieves a child Range counter.
 com.ibm.rational.test.lt.kernel.statistics.impl.Rate getRate(String[] path)
          Retrieves a child Rate counter.
 com.ibm.rational.test.lt.kernel.statistics.impl.Scalar getScalar(String[] path)
          Retrieves a child Scalar counter.
 com.ibm.rational.test.lt.kernel.statistics.impl.Static getStatic(String[] path)
          Retrieves a child Static counter.
 IStatTree getStatTree()
          Returns the root of the statistical counter tree.
 com.ibm.rational.test.lt.kernel.statistics.impl.StatTree getStructure(String[] path)
          Retrieves a Structure counter.
 com.ibm.rational.test.lt.kernel.statistics.impl.Text getText(String[] path)
          Retrieves a child Text counter.
 com.ibm.rational.test.lt.kernel.statistics.IVerificationPoint getVerificationPoint(String[] path)
          Retrieves a child VerificationPoint counter.
 void reportVerificationPoint(org.eclipse.hyades.test.common.event.VerdictEvent vp, com.ibm.rational.test.lt.kernel.statistics.IVerificationPoint vpStat)
          Report a TPTP VerdictEvent as a verification point.
 boolean wouldReport(int level)
          Determines if the current execution will report statistics at a given level.
 

Field Detail

NONE

static final int NONE
Reports no statistics.

Used for internal testing purposes only.

See Also:
Constant Field Values

PRIMARY_COUNTERS

static final int PRIMARY_COUNTERS
Reports a moderate number of statistical counters.

This level includes counters that the protocol determines to be of primary importance. This is the same as PRIMARY_TEST_ACTIONS.

(HTTP) Reports statistics related to pages but not to individual requests.

See Also:
IStatisticsManager.ALL, IStatisticsManager.SCHEDULE_ACTIONS, IStatisticsManager.PRIMARY_TEST_ACTIONS, IStatisticsManager.SECONDARY_TEST_ACTIONS, Constant Field Values

ALL

static final int ALL
Reports all statistical counters.

This level includes all available counters.

(HTTP) Reports statistics related to individual HTTP requests.

See Also:
IStatisticsManager.SCHEDULE_ACTIONS, IStatisticsManager.PRIMARY_TEST_ACTIONS, IStatisticsManager.SECONDARY_TEST_ACTIONS, Constant Field Values

SCHEDULE_ACTIONS

static final int SCHEDULE_ACTIONS
Reports only those statistical counters associated with the schedule.

This level includes counters that reported by schedule level actions and does not include any protocol counters.

See Also:
IStatisticsManager.ALL, IStatisticsManager.PRIMARY_TEST_ACTIONS, IStatisticsManager.SECONDARY_TEST_ACTIONS, Constant Field Values

PRIMARY_TEST_ACTIONS

static final int PRIMARY_TEST_ACTIONS
Reports a moderate number of statistical counters.

This level includes counters that the protocol determines to be of primary importance. This is the same as PRIMARY_COUNTERS.

(HTTP) Reports statistics related to pages but not to individual requests.

See Also:
IStatisticsManager.ALL, IStatisticsManager.SCHEDULE_ACTIONS, IStatisticsManager.PRIMARY_COUNTERS, IStatisticsManager.SECONDARY_TEST_ACTIONS, Constant Field Values

SECONDARY_TEST_ACTIONS

static final int SECONDARY_TEST_ACTIONS
Reports a large number of statistical counters.

This level includes all counters that the protocol determines to be of primary importance plus those determined to be of secondary importance.

(HTTP) Reports statistics related to individual HTTP requests.

See Also:
IStatisticsManager.ALL, IStatisticsManager.SCHEDULE_ACTIONS, IStatisticsManager.PRIMARY_TEST_ACTIONS, Constant Field Values
Method Detail

getLevel

int getLevel()
Returns the current level of statistics verbosity.

Returns:
The current level of statistics verbosity.

wouldReport

boolean wouldReport(int level)
Determines if the current execution will report statistics at a given level.

Returns true if a statistics counter of the given statisticsLevel should be created. This method evaluates the statistics level and whether the calling virtual user is being sampled.

Parameters:
level - The level of the proposed counter.
Returns:
True if a statistics counter of the given level should be created.

getStatTree

IStatTree getStatTree()
Returns the root of the statistical counter tree.

Returns:
The root of the counter tree.

getStructure

com.ibm.rational.test.lt.kernel.statistics.impl.StatTree getStructure(String[] path)
Retrieves a Structure counter.

Uses getStat() to find or create a Structure counter of the given path. The path is relative to the root of the statistics tree. Each element of the path array specifies one level in the statistics tree hierarchy. All counters along the path that do not already exist will be created. All counters that are created by this method will be type STRUCTURE.

Parameters:
path - The path to the desired Structure counter.
Returns:
A reference to the requested Structure counter.

getText

com.ibm.rational.test.lt.kernel.statistics.impl.Text getText(String[] path)
Retrieves a child Text counter.

Uses getStat() to find or create a Text counter of the given path. The path is relative to the root of the statistics tree. Each element of the path array specifies one level in the statistics tree hierarchy. All counters along the path that do not already exist will be created. All counters that are created by this method except the last element of path will be type STRUCTURE.

Parameters:
path - The path to the desired Text counter.
Returns:
A reference to the requested Text counter.

getStatic

com.ibm.rational.test.lt.kernel.statistics.impl.Static getStatic(String[] path)
Retrieves a child Static counter.

Uses getStat() to find or create a Static counter of the given path. The path is relative to the root of the statistics tree. Each element of the path array specifies one level in the statistics tree hierarchy. All counters along the path that do not already exist will be created. All counters that are created by this method except the last element of path will be type STRUCTURE.

Parameters:
path - The path to the desired counter.
Returns:
A reference to the requested Static counter.

getScalar

com.ibm.rational.test.lt.kernel.statistics.impl.Scalar getScalar(String[] path)
Retrieves a child Scalar counter.

Uses getStat() to find or create a Scalar counter of the given path. The path is relative to the root of the statistics tree. Each element of the path array specifies one level in the statistics tree hierarchy. All counters along the path that do not already exist will be created. All counters that are created by this method except the last element of path will be type STRUCTURE.

Parameters:
path - The path to the desired Scalar counter.
Returns:
A reference to the requested Scalar counter.

getRate

com.ibm.rational.test.lt.kernel.statistics.impl.Rate getRate(String[] path)
Retrieves a child Rate counter.

Uses getStat() to find or create a Rate counter of the given path. The path is relative to the root of the statistics tree. Each element of the path array specifies one level in the statistics tree hierarchy. All counters along the path that do not already exist will be created. All counters that are created by this method except the last element of path will be type STRUCTURE.

Parameters:
path - The path to the desired Rate counter.
Returns:
A reference to the requested Rate counter.

getAverage

com.ibm.rational.test.lt.kernel.statistics.impl.Average getAverage(String[] path)
Retrieves a child Average counter.

Uses getStat() to find or create a Average counter of the given path. The path is relative to the root of the statistics tree. Each element of the path array specifies one level in the statistics tree hierarchy. All counters along the path that do not already exist will be created. All counters that are created by this method except the last element of path will be type STRUCTURE.

Parameters:
path - The path to the desired Average counter.
Returns:
A reference to the requested Average counter.

getRange

com.ibm.rational.test.lt.kernel.statistics.impl.Range getRange(String[] path)
Retrieves a child Range counter.

Uses getStat() to find or create a Range counter of the given path. The path is relative to the root of the statistics tree. Each element of the path array specifies one level in the statistics tree hierarchy. All counters along the path that do not already exist will be created. All counters that are created by this method except the last element of path will be type STRUCTURE.

Parameters:
path - The path to the desired Range counter.
Returns:
A reference to the requested Range counter.

getVerificationPoint

com.ibm.rational.test.lt.kernel.statistics.IVerificationPoint getVerificationPoint(String[] path)
Retrieves a child VerificationPoint counter.

Uses getStat() to find or create a VerificationPoint counter of the given path. The path is relative to the root of the statistics tree. Each element of the path array specifies one level in the statistics tree hierarchy. All counters along the path that do not already exist will be created. All counters that are created by this method except the last element of path will be type STRUCTURE.

Parameters:
path - The path to the desired VerificationPoint counter.
Returns:
A reference to the requested VerificationPoint counter.

reportVerificationPoint

void reportVerificationPoint(org.eclipse.hyades.test.common.event.VerdictEvent vp,
                             com.ibm.rational.test.lt.kernel.statistics.IVerificationPoint vpStat)
Report a TPTP VerdictEvent as a verification point.

VerdictEvents reported by this method contribute to the rollup of verdicts by the parent containers. The counter for the verdict in the given VerificationPoint statistics counter is incremented.

Parameters:
vp - the TPTP VerdictEvent to report as a verification point.
vpStat - the counter associated with this verification point.

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.