|
IBM Rational Performance Tester SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITransaction
The ITransaction interface provides transaction support for users of ICustomCode2
.
A collection of named transactions is maintained for each virtual user. A transaction is created by calling
.
Transactions created with custom code can be started and stopped wherever custom code can be used. These
transactions can span several tests. Statistical counters are kept for custom code
transactions as they are for modeled transactions, and are represented in the graphs and reports in performance test results.ITestExecutionServices
.getTransaction(name)
ITestExecutionServices
,
TransactionException
,
ICustomCode2
Method Summary | |
---|---|
void |
abort()
Removes the transaction object from the virtual user's transaction collection. |
long |
getElapsedTime()
Returns the elapsed time for a transaction. |
long |
getStartTime()
Returns the start time for the transaction. |
boolean |
isStarted()
Tests whether a transaction has been started. |
long |
start()
Starts the transaction using the current time as the start timestamp. |
long |
start(long startTime)
Starts the transaction with the given timestamp as the starting time. |
long |
stop()
Stops the named transaction. |
long |
stop(long stopTime)
Stops the named transaction, using the given time as the stop time. |
Method Detail |
---|
long start()
This method also creates and increments a transaction-attempt statistical counter. It returns the start time and reports a testLog event.
If the transaction has already been started or has been aborted start()
throws
a TransactionException
.
long start(long startTime)
The timestamp provided must be obtained by
ITime
.timeInTest()
or from a timestamp that is provided by a protocol.
This method also creates and increments a transaction attempt statistical counter. It returns the start time and reports a testLog event.
If the transaction has been started or aborted start()
throws
a TransactionException
.
long getStartTime()
If the transaction has not been started or has been aborted, getStartTime()
throws
a TransactionException
.
long getElapsedTime()
If the transaction has been stopped, the time returned is the difference between the stop time and the start time. If the transaction has not been stopped, the time returned is the difference between the current time and the start time.
If the transaction has not been started or has been aborted getElapsedTime()
throws
a TransactionException
.
long stop()
Reports a test log event. Creates and increments a transaction response Range (min, max, average, count) counter. Uses the current time as the end time. Returns the elapsed time. Removes the transaction from the virtual tester's transaction collection.
If the transaction has not been started, has already been stopped or has been aborted,
stop()
throws
a TransactionException
.
long stop(long stopTime)
The timestamp provided must obtained by
ITime
.timeInTest()
or from a timestamp that is provided by a protocol.
Reports a test log event. Creates and increments a transaction response range (min, max, average, count) counter. Uses the current time as the end time. Returns the elapsed time. Removes the transaction from the virtual user's transaction collection.
If the transaction has not been started, has been stopped or has been aborted,
stop()
throws
a TransactionException
.
stopTime
- The time to use as the stop time.
void abort()
boolean isStarted()
If the transaction has been aborted,
isStarted()
throws
a TransactionException
.
|
IBM Rational Performance Tester SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |