|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.qpid.junit.extensions.AsymptoticTestCase
org.apache.qpid.ping.PingTestPerf
org.apache.qpid.ping.PingLatencyTestPerf
public class PingLatencyTestPerf
PingLatencyTestPerf is a performance test that outputs multiple timings from its test method, using the timing
controller interface supplied by the test runner from a seperate listener thread. It outputs round trip timings for
individual ping messages rather than for how long a complete batch of messages took to process. It also differs from
the PingTestPerf
test that it extends because it can output timings as replies are received, rather than
waiting until all expected replies are received.
TEST_RESULTS_BATCH_SIZE_PROPNAME
property, to override the
default of every DEFAULT_TEST_RESULTS_BATCH_SIZE
.
The size parameter logged for each individual ping is set to the size of the batch of messages that the
individual timed ping was taken from, rather than 1 for a single message. This is so that the total throughput
(messages / time) can be calculated in order to examine the relationship between throughput and latency.
Responsibilities | Collaborations |
---|---|
Send many ping messages and output timings for sampled individual pings. |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.qpid.ping.PingTestPerf |
---|
PingTestPerf.PerThreadSetup |
Field Summary | |
---|---|
static int |
DEFAULT_TEST_RESULTS_BATCH_SIZE
Holds the default test results logging batch size. |
static String |
TEST_RESULTS_BATCH_SIZE_PROPNAME
Holds the name of the property to get the test results logging batch size. |
Fields inherited from class org.apache.qpid.ping.PingTestPerf |
---|
testParameters, threadSetup |
Constructor Summary | |
---|---|
PingLatencyTestPerf(String name)
Creates a new asynchronous ping performance test with the specified name. |
Method Summary | |
---|---|
org.apache.qpid.junit.extensions.TimingController |
getTimingController()
Gets the timing controller passed in by the test runner. |
void |
setTimingController(org.apache.qpid.junit.extensions.TimingController timingController)
Accepts a timing controller from the test runner. |
static junit.framework.Test |
suite()
Compile all the tests into a test suite. |
void |
testPingLatency(int numPings)
Sends the specified number of pings, asynchronously outputs timings on every batch boundary, and waits until all replies have been received or a time out occurs before exiting this method. |
void |
threadSetUp()
Performs test fixture creation on a per thread basis. |
Methods inherited from class org.apache.qpid.ping.PingTestPerf |
---|
postThreadSetUp, testPingOk, threadTearDown |
Methods inherited from class org.apache.qpid.junit.extensions.AsymptoticTestCase |
---|
getN, getTestEndMemory, getTestStartMemory, getTestTime, reset, runTest, setN |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface junit.framework.Test |
---|
countTestCases, run |
Field Detail |
---|
public static final String TEST_RESULTS_BATCH_SIZE_PROPNAME
public static final int DEFAULT_TEST_RESULTS_BATCH_SIZE
Constructor Detail |
---|
public PingLatencyTestPerf(String name)
name
- The test name.Method Detail |
---|
public static junit.framework.Test suite()
public void setTimingController(org.apache.qpid.junit.extensions.TimingController timingController)
setTimingController
in interface org.apache.qpid.junit.extensions.TimingControllerAware
timingController
- The timing controller to register mutliple timings with.public org.apache.qpid.junit.extensions.TimingController getTimingController()
public void testPingLatency(int numPings) throws Exception
numPings
- The number of pings to send.
Exception
public void threadSetUp()
threadSetUp
in interface org.apache.qpid.junit.extensions.TestThreadAware
threadSetUp
in class PingTestPerf
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |