|
|||||||||
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.TransferSpeedTest
public class TransferSpeedTest
This test module tests the transfer speed of the networks by sending packets
with increasing sizes. When a set of packets
has been sent, the size of the packets is increased with the amount specfied in the
SIZE_INC
variable.
The test results from this test are calculated by finding the minimum, maximum and
average transfer times for each size set, and calculating the transfer speed based
on the average.
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 char |
ID_CHAR
|
static int |
INITIAL_SIZE
|
static int |
LATENCY_START
|
static int |
SIZE_INC
|
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 | |
---|---|
TransferSpeedTest(SocketWrapper socket,
AbstractServer server)
Creates a transfer speed 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 transfer time for the specified interval number. |
protected java.lang.String |
findIdString(java.lang.String message)
Extracts the id from the message by removing the x's and the '!' |
protected java.lang.String[] |
getHeaders()
Gets the headers for the coloumns in the report. |
protected long |
getInitialInterval()
Returns the intital send interval between the messages. |
protected java.lang.String |
getInitialMessage()
Creates the initial message based on the INITIAL_SIZE value. |
protected java.lang.String |
getStringToSend(int id)
Creates the string to send by appending the specified number of 'x' characters to the id and separator. |
protected java.lang.String |
getTitle()
Gets the title for the report. |
protected void |
notifyAboutIntervalComplete()
Called when one size set 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 char ID_CHAR
public static final int INITIAL_SIZE
public static final int SIZE_INC
public static final int LATENCY_START
Constructor Detail |
---|
public TransferSpeedTest(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 void notifyAboutIntervalComplete()
SIZE_INC
, and the correct number of 'x' characters
is added to the message to send.
notifyAboutIntervalComplete
in class TestModule
protected long getInitialInterval()
getInitialInterval
in class TestModule
protected java.lang.String getInitialMessage()
getInitialMessage
in class TestModule
protected java.lang.String getStringToSend(int id)
getStringToSend
in class TestModule
id
- The id of the message.
protected java.lang.String findIdString(java.lang.String message)
findIdString
in class TestModule
message
- The message that was returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |