|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectserver.framework.network.ServerSocketCommunicator
server.testmodules.TestModule
server.testmodules.PingTest
public class PingTest
This test module tests the response time of the networks by sending very
small packets (4 bytes) with increasing intervals between each packet. When a set of packets
has been sent, the interval is increased with the amount specfied in the
INTERVAL_INC
variable.
The test results from this test are calculated by finding the minimum, maximum and
average response times for each interval set.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class server.testmodules.TestModule |
---|
TestModule.Sender, TestModule.TestType, TestModule.Timer |
Nested classes/interfaces inherited from class server.framework.network.ServerSocketCommunicator |
---|
ServerSocketCommunicator.ReceiverThread, ServerSocketCommunicator.SenderThread |
Field Summary | |
---|---|
static int |
INTERVAL_INC
|
static int |
LATENCY_START
|
Fields inherited from class server.testmodules.TestModule |
---|
allTests, currentRun, interval, message, NETWORK, NOF_INTERVALS, NOF_PACKETS, NOF_RUNS, PROVIDER, random |
Fields inherited from class server.framework.network.ServerSocketCommunicator |
---|
receiverThread, senderThread, server, socket |
Constructor Summary | |
---|---|
PingTest(SocketWrapper socket,
AbstractServer server)
Creates a ping test instance by calling the super constructor. |
Method Summary | |
---|---|
protected java.lang.Number[] |
calculateValues(TestModule.Timer[] timers,
int interval_no)
Method that calculates the minimum, maximum and average response time for the specified interval number. |
protected java.lang.String |
findIdString(java.lang.String message)
Since the messages in this test only consist of the id and the end character, the id string is simply the message. |
protected java.lang.String[] |
getHeaders()
Gets the headers for the coloumns in the report. |
protected long |
getInitialInterval()
Gets the initial interval to use between sends. |
protected java.lang.String |
getInitialMessage()
The first message to send. |
protected java.lang.String |
getStringToSend(int id)
Creates the string to send. |
protected java.lang.String |
getTitle()
Gets the title for the report. |
protected void |
notifyAboutIntervalComplete()
Called when one interval has been completed. |
Methods inherited from class server.testmodules.TestModule |
---|
close, connect, disconnect, getAllValues, getId, getLastId, getReport, getThreeDigitString, getTimeInSeconds, notifyAboutMessageReceived, notifyAboutRunComplete, runTest, searchForNodes, sendMessage |
Methods inherited from class server.framework.network.ServerSocketCommunicator |
---|
getSocket |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INTERVAL_INC
public static final int LATENCY_START
Constructor Detail |
---|
public PingTest(SocketWrapper socket, AbstractServer server)
socket
- The socket to use for the transmission.server
- The server model.Method Detail |
---|
protected java.lang.String[] getHeaders()
TestModule
getHeaders
in class TestModule
protected java.lang.Number[] calculateValues(TestModule.Timer[] timers, int interval_no)
calculateValues
in class TestModule
timers
- The set of measured response times for each packet.interval_no
- The interval for which to calculate the values.
protected java.lang.String getTitle()
TestModule
getTitle
in class TestModule
protected java.lang.String getStringToSend(int id)
getStringToSend
in class TestModule
id
- The id of the packet.
protected void notifyAboutIntervalComplete()
INTERVAL_INC
.
notifyAboutIntervalComplete
in class TestModule
protected long getInitialInterval()
TestModule
getInitialInterval
in class TestModule
protected java.lang.String getInitialMessage()
getInitialMessage
in class TestModule
protected java.lang.String findIdString(java.lang.String message)
findIdString
in class TestModule
message
- The message that was received.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |