- All Implemented Interfaces:
ActionListener
Main Applet class that creates UI, defines tests and interprets results from the tests.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classTimer base for periodic NDT phases.(package private) classClass to start tests in a thread.Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanSet when the current test run failed.(package private) booleanSet when the client is a native application rather than a browser.private final AtomicBooleanTrue while a bandwidth test is running.(package private) JButtonButton details.(package private) JButtonButton start test.(package private) JButtonButton statistics.(package private) intHow often, in ms, the down and up speed displays are refreshed.(package private) JCheckBoxChkbox default test.(package private) JCheckBoxChkbox default test.private final I2PAppContextThe app context.(package private) doubleMeasured speeds: server-to-client, client-to-server, and their slow-start phases.private StringStatus text shown in the applet.(package private) doubleMeasured speeds: server-to-client, client-to-server, and their slow-start phases.(package private) doubleTotal bytes sent by the server.(package private) doubleMeasured speeds: server-to-client, client-to-server, and their slow-start phases.(package private) doubleMeasured speeds: server-to-client, client-to-server, and their slow-start phases.(package private) doubleElapsed test time in seconds.(package private) NewFrameFrame web100 vars.(package private) NewFrameFrame web100 vars.(package private) intData packets out, socket buffer sizes, and ACKs in.(package private) intCongestion-control state: fast retransmits, ACKs out, smoothed RTT, and congestion window.(package private) intMessage counts: client-to-server data and ACKs, server-to-client data and ACKs.(package private) intMessage counts: client-to-server data and ACKs, server-to-client data and ACKs.(package private) intMiddlebox (firewall) verdict for the client-to-server test.(package private) intPackets out, congestion signals, and receive-window scale.(package private) intRTT totals and counts, current MSS, timeouts, and retransmitted packets.(package private) intCongestion-control state: fast retransmits, ACKs out, smoothed RTT, and congestion window.(package private) intRTT totals and counts, current MSS, timeouts, and retransmitted packets.(package private) intPacket count, buffer length, and current retransmission timeout.(package private) longTotal data bytes sent to the client.(package private) intData packets out, socket buffer sizes, and ACKs in.(package private) intSACKs received, duplicate ACKs in, and max receive window sent and received.(package private) intTCP feature flags: ECN, Nagle, and the MSS sent and received.(package private) intCongestion-control state: fast retransmits, ACKs out, smoothed RTT, and congestion window.(package private) intPacket count, buffer length, and current retransmission timeout.(package private) intCongestion-control state: fast retransmits, ACKs out, smoothed RTT, and congestion window.(package private) intSACKs received, duplicate ACKs in, and max receive window sent and received.(package private) intSACKs received, duplicate ACKs in, and max receive window sent and received.(package private) intSend-limited transfer counts for rwin, cwnd, and sender, plus max slow-start threshold.(package private) intTCP feature flags: ECN, Nagle, and the MSS sent and received.(package private) intPacket count, buffer length, and current retransmission timeout.(package private) intPackets out, congestion signals, and receive-window scale.(package private) intRTT totals and counts, current MSS, timeouts, and retransmitted packets.(package private) intData packets out, socket buffer sizes, and ACKs in.(package private) intPackets out, congestion signals, and receive-window scale.(package private) intMessage counts: client-to-server data and ACKs, server-to-client data and ACKs.(package private) intMessage counts: client-to-server data and ACKs, server-to-client data and ACKs.(package private) intMiddlebox (firewall) verdict for the server-to-client test.(package private) intTCP feature flags: SACK, timestamps, and window scaling sent and received.(package private) intSACKs received, duplicate ACKs in, and max receive window sent and received.(package private) intCongestion-control state: fast retransmits, ACKs out, smoothed RTT, and congestion window.(package private) intData packets out, socket buffer sizes, and ACKs in.(package private) intSeconds spent send-limited by receive window, congestion window, and sender.(package private) intSeconds spent send-limited by receive window, congestion window, and sender.(package private) intSeconds spent send-limited by receive window, congestion window, and sender.(package private) intSend-limited transfer counts for rwin, cwnd, and sender, plus max slow-start threshold.(package private) intSend-limited transfer counts for rwin, cwnd, and sender, plus max slow-start threshold.(package private) intSend-limited transfer counts for rwin, cwnd, and sender, plus max slow-start threshold.(package private) intServer send-queue length.(package private) intRTT totals and counts, current MSS, timeouts, and retransmitted packets.(package private) intRTT totals and counts, current MSS, timeouts, and retransmitted packets.(package private) intTCP feature flags: SACK, timestamps, and window scaling sent and received.(package private) intTCP feature flags: SACK, timestamps, and window scaling sent and received.(package private) intTCP feature flags: SACK, timestamps, and window scaling sent and received.private LocaleLocale selected for the test display.private final LogLogger for the test.private ResourceBundleBundle of translated test messages.(package private) ResultsTextPaneResults txt pane.(package private) intHow often, in ms, the down and up speed displays are refreshed.(package private) String[]Sa delays.private StringClient type reported to the test server.private StringCountry code for the display messages.(package private) StringError message shown when a test fails.private StringParameter telling the applet to run automatically.private StringLanguage code for the display messages.private StatusPanelPanel showing the test status.(package private) JSpinnerSpinner test count.(package private) StringServer flavour, "web100" or "web10g", selects which messages the server understands.private final I2PSSLSocketFactoryFactory for the SSL test sockets.(package private) StringAccumulated human-readable test results and diagnostics.private StringBrowser user agent string, if supplied.private ThreadGroupThread group holding the test threads.(package private) JTextAreaTxt diagnosis.(package private) JTextAreaTxt diagnosis.private final booleanWhether the test connects over SSL.(package private) byte[]Scratch buffer for writing test data to the client.(package private) byteBit mask of the tests to run: C2S, S2C, status and meta.(package private) doubleAchievable speed.(package private) doublePacket loss rate.(package private) intHalf duplex.(package private) intHalf duplex.(package private) doublePacket ordering metric.(package private) doublePacket ordering metric.(package private) doublePacket loss rate.(package private) intHalf duplex.(package private) InetAddressHost address.private booleanWhether the server supports JSON results.(package private) doublePacket loss rate.(package private) intHalf duplex.(package private) intTCP feature flags: ECN, Nagle, and the MSS sent and received.(package private) intTCP feature flags: ECN, Nagle, and the MSS sent and received.(package private) doubleMeasured link speed.(package private) doublePacket ordering metric.private StringClient access technology, such as cable or DSL.private doubleAverage round trip time during the test, in ms.private intFlag for a bad cable modem condition.private longBytes transferred during the test.private doubleUpload speed from client to server, in Kbps.private StringClient IP address as seen by the server.private intFlag for network congestion during the test.private intCurrent retransmission timeout during the test.private intCurrent receive window advertised by the server.private doubleShare of the test spent in congestion window growth.private StringDiagnosis of what limited the test result.private intDuplicate acknowledgements received during the test.private intDuplicate acknowledgements sent during the test.private StringError message from the test, if it failed.private StringClient host name reported to the server.private doublePacket loss during the test, as a fraction.private intLongest retransmission timeout during the test.private intLongest round trip time during the test, in ms.private intLargest receive window advertised by the server.private intShortest retransmission timeout during the test.private intShortest round trip time during the test, in ms.private intFlag for a client-server version mismatch.private StringClient NAT box type reported by the plugin.private StringClient OS architecture reported to the server.private StringClient OS name reported to the server.private StringClient OS version reported by the plugin.private doubleShare of the test limited by the receiver.private StringClient plugin version reported to the server.private doubleDownload speed from server to client, in Kbps.private intSelective acknowledgements received during the test.private StringTest statistics formatted for display.private StringStatus string shown to the test UI.private doubleElapsed time of the test, in seconds.private intRetransmission timeouts during the test.private DateWhen the test finished.private booleanWhether to retry a failed test.(package private) doublePacket loss rate.(package private) doublePacket ordering metric.(package private) doublePacket ordering metric.(package private) doublePacket ordering metric.private static final longCompiler generated UID that does not follow naming convention, and is not related to functionality itself.(package private) StringServer host name used for the test.(package private) doublePacket loss rate.(package private) doublePacket ordering metric.(package private) doublePacket loss rate.(package private) doublePacket loss rate.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent paramEventObj) Action handler method called when an associated action is performed.voidCreate the "More details" window.private voidInitialize the "main" window.voidCreate the "Statistics" window.voiddottcp(StatusPanel sPanel) Method to run tests and interpret the results sent by the server.Returns the access technology the server detected for the link.Returns the average round trip time the server reported, in milliseconds.Reports whether the server flagged the link as a bad cable.Measured upload (client-to-server) speed as a plain decimal string.Returns the client address the server saw, as text.Reports whether the server flagged congestion on the link.Returns the current retransmission timeout the server reported, in milliseconds.Returns the current TCP receive window the server reported, in bytes.Returns the fraction of the run limited by the congestion window.Returns the diagnosis text left behind by the most recent run.Returns the count of duplicate acknowledgements the client received.Returns the count of duplicate acknowledgements the client sent.Returns the error text left behind by the most recent run.get_host()Returns the host name this applet is pointed at.Returns the speed measured since the last sample, in bits per millisecond.Returns the spread between the largest and smallest round trip times, in milliseconds.get_loss()Returns the packet loss the server reported, as a fraction from 0 to 1.Returns the largest round trip time the server reported, in milliseconds.Returns the largest receive window the server reported, in bytes.Reports whether the server saw a speed mismatch between the two directions.Returns the NAT type the server detected for this client.Suggests a receive buffer size in KiB, derived from the largest window seen.Returns the operating system architecture the client reported.Returns the operating system name the client reported.Returns the operating system version the client reported.Returns the throughput ceiling the receive window over round trip time sets.get_Ping()Returns the minimum round trip time the server reported, in milliseconds.Returns the plugin version the client reported.Returns the percentage of the run the receive buffer was too small.Measured download (server-to-client) speed as a plain decimal string.Returns the count of selective acknowledgement packets the client received.Returns the statistics summary left behind by the most recent run.Returns the current run state, notStarted until a test begins.Returns the clock stamp the server sent, or the word unknown when absent.Estimates the stall time in seconds from the current timeout and its count.intGet Client->Server fire-wall test results.Function that returns a variable corresponding to the parameter passed to it as a request.getParameter(String paramStrName) Utility method to get parameter value.intGet Server->Client fire-wall test results.I2P Translated status, not HTML escaped.Set UserAgent String containing browser details.voidinit()Initialize the base NDT window Appletinit()method.booleanReports whether a test run is currently in progress.private booleanisValueSave(String sSysvarParam) Check if the given key is one whose value is saved bysave_int_values(String, int), save_dbl_values(), or save_long_values().voidkillIt()Stop the test and kill its thread group.static voidPublic static void main for invoking as an Application.static Tcpbw100mainSupport(String[] args) Builds and shows the applet in a 700x320 window from the command line.private SocketnewSocket(InetAddress hostAddress, int ctlPort) Return a SSL or standard socket depending on config.private intparseMsgBodyToInt(String msg) Parse a message body string to an integer using base 10.private intparseMsgBodyToInt(String msg, int radix) Parse a message body string to an integer using the given radix.voidrun_test()"Remote Control" function - invoke NDT'runtest()method from the API.voidrunIt()Runs the configured tests on a daemon thread in a private daemon thread group, so an uncaught error is logged rather than reaching the default handler.voidruntest()Run the Thread that calls the "dottcp" method to run tests.voidsave_dbl_values(String sSysvarParam, double dSysvalParam) Save double values of various keys from the test results string.voidsave_int_values(String sSysvarParam, int iSysvalParam) Save integer values of various keys from the test results string.voidsave_long_values(String sSysvarParam, long lSysvalParam) Save long values of various keys from the test results string.voidsetC2sSFWTestResults(int iParamC2SRes) Set Client->Server fire-wall test results.voidsetS2cSFWTestResults(int iParamS2CRes) Set server->Client fire-wall test results.private voidsetsHostName(String sHostName) Sets the host name of the test server.voidsetUserAgent(String paramStrUserAgent) Set UserAgent String.voidshowStatus(String msg) Display current status in Applet window.booleanClient to server throughput test.booleanThe META test allows the Client to send an additional information to the Server that basically gets included along with the overall set of test results.booleanPlaceholder for the mid-link test; returns false without contacting the server.booleanS2C throughput test to measure network bandwidth from server to client.booleanPlaceholder for the SFW firewall test; returns false without contacting the server.voidtestResults(String sTestResParam) Method that interprets test results.Methods inherited from class JApplet
getAppletContext, getCodeBase, startMethods inherited from class JFrame
destroy, dispose, getContentPane, toBackMethods inherited from class Component
add, add, add, addMouseListener, addWindowListener, getToolkit, pack, repaint, setBorder, setCursor, setEditable, setEnabled, setForeground, setLayout, setLayout, setPreferredSize, setResizable, setSize, setTitle, setVisibleModifier and TypeMethodDescriptionvoidStub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.Creates a stub toolkit; this AWT emulation has no real one.voidpack()Stub, does nothing.voidrepaint()Stub, does nothing.voidStub, discards its arguments.voidStub, discards its arguments.voidsetEditable(boolean b) Stub, discards its arguments.voidsetEnabled(boolean b) Stub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.voidStub, discards its arguments.voidsetResizable(boolean b) Stub, discards its arguments.voidsetSize(int i, int j) Stub, discards its arguments.voidStub, discards its arguments.voidsetVisible(boolean b) Stub, discards its arguments.
Field Details
serialVersionUID
private static final long serialVersionUIDCompiler generated UID that does not follow naming convention, and is not related to functionality itself.- See Also:
_txtDiagnosis
JTextArea _txtDiagnosisTxt diagnosis._txtStatistics
JTextArea _txtStatisticsTxt diagnosis._resultsTxtPane
ResultsTextPane _resultsTxtPaneResults txt pane._sErrMsg
String _sErrMsgError message shown when a test fails._buttonStartTest
JButton _buttonStartTestButton start test._buttonDetails
JButton _buttonDetailsButton details._buttonStatistics
JButton _buttonStatisticsButton statistics._chkboxDefaultTest
JCheckBox _chkboxDefaultTestChkbox default test._chkboxPreferIPv6
JCheckBox _chkboxPreferIPv6Chkbox default test._spinnerTestCount
JSpinner _spinnerTestCountSpinner test count._saDelays
String[] _saDelaysSa delays._bFailed
boolean _bFailedSet when the current test run failed._frameWeb100Vars
NewFrame _frameWeb100VarsFrame web100 vars._frameDetailedStats
NewFrame _frameDetailedStatsFrame web100 vars._dTime
double _dTimeElapsed test time in seconds._s2cspdUpdateTime
int _s2cspdUpdateTimeHow often, in ms, the down and up speed displays are refreshed._c2sspdUpdateTime
int _c2sspdUpdateTimeHow often, in ms, the down and up speed displays are refreshed._iECNEnabled
int _iECNEnabledTCP feature flags: ECN, Nagle, and the MSS sent and received._iNagleEnabled
int _iNagleEnabledTCP feature flags: ECN, Nagle, and the MSS sent and received.MSSSent
int MSSSentTCP feature flags: ECN, Nagle, and the MSS sent and received.MSSRcvd
int MSSRcvdTCP feature flags: ECN, Nagle, and the MSS sent and received._iSACKEnabled
int _iSACKEnabledTCP feature flags: SACK, timestamps, and window scaling sent and received._iTimestampsEnabled
int _iTimestampsEnabledTCP feature flags: SACK, timestamps, and window scaling sent and received._iWinScaleRcvd
int _iWinScaleRcvdTCP feature flags: SACK, timestamps, and window scaling sent and received._iWinScaleSent
int _iWinScaleSentTCP feature flags: SACK, timestamps, and window scaling sent and received._iFastRetran
int _iFastRetranCongestion-control state: fast retransmits, ACKs out, smoothed RTT, and congestion window._iAckPktsOut
int _iAckPktsOutCongestion-control state: fast retransmits, ACKs out, smoothed RTT, and congestion window._iSmoothedRTT
int _iSmoothedRTTCongestion-control state: fast retransmits, ACKs out, smoothed RTT, and congestion window._iCurrentCwnd
int _iCurrentCwndCongestion-control state: fast retransmits, ACKs out, smoothed RTT, and congestion window._iMaxCwnd
int _iMaxCwndCongestion-control state: fast retransmits, ACKs out, smoothed RTT, and congestion window._iSndLimTimeRwin
int _iSndLimTimeRwinSeconds spent send-limited by receive window, congestion window, and sender._iSndLimTimeCwnd
int _iSndLimTimeCwndSeconds spent send-limited by receive window, congestion window, and sender._iSndLimTimeSender
int _iSndLimTimeSenderSeconds spent send-limited by receive window, congestion window, and sender._iSndLimTransRwin
int _iSndLimTransRwinSend-limited transfer counts for rwin, cwnd, and sender, plus max slow-start threshold._iSndLimTransCwnd
int _iSndLimTransCwndSend-limited transfer counts for rwin, cwnd, and sender, plus max slow-start threshold._iSndLimTransSender
int _iSndLimTransSenderSend-limited transfer counts for rwin, cwnd, and sender, plus max slow-start threshold._iMaxSsthresh
int _iMaxSsthreshSend-limited transfer counts for rwin, cwnd, and sender, plus max slow-start threshold._iSumRTT
int _iSumRTTRTT totals and counts, current MSS, timeouts, and retransmitted packets._iCountRTT
int _iCountRTTRTT totals and counts, current MSS, timeouts, and retransmitted packets._iCurrentMSS
int _iCurrentMSSRTT totals and counts, current MSS, timeouts, and retransmitted packets._iTimeouts
int _iTimeoutsRTT totals and counts, current MSS, timeouts, and retransmitted packets._iPktsRetrans
int _iPktsRetransRTT totals and counts, current MSS, timeouts, and retransmitted packets._iSACKsRcvd
int _iSACKsRcvdSACKs received, duplicate ACKs in, and max receive window sent and received._iDupAcksIn
int _iDupAcksInSACKs received, duplicate ACKs in, and max receive window sent and received._iMaxRwinRcvd
int _iMaxRwinRcvdSACKs received, duplicate ACKs in, and max receive window sent and received._iMaxRwinSent
int _iMaxRwinSentSACKs received, duplicate ACKs in, and max receive window sent and received._iDataPktsOut
int _iDataPktsOutData packets out, socket buffer sizes, and ACKs in._iRcvbuf
int _iRcvbufData packets out, socket buffer sizes, and ACKs in._iSndbuf
int _iSndbufData packets out, socket buffer sizes, and ACKs in._iAckPktsIn
int _iAckPktsInData packets out, socket buffer sizes, and ACKs in._iDataBytesOut
long _iDataBytesOutTotal data bytes sent to the client._iPktsOut
int _iPktsOutPackets out, congestion signals, and receive-window scale._iCongestionSignals
int _iCongestionSignalsPackets out, congestion signals, and receive-window scale._iRcvWinScale
int _iRcvWinScalePackets out, congestion signals, and receive-window scale._iPkts
int _iPktsPacket count, buffer length, and current retransmission timeout._iLength
int _iLengthPacket count, buffer length, and current retransmission timeout._iCurrentRTO
int _iCurrentRTOPacket count, buffer length, and current retransmission timeout._iC2sData
int _iC2sDataMessage counts: client-to-server data and ACKs, server-to-client data and ACKs._iC2sAck
int _iC2sAckMessage counts: client-to-server data and ACKs, server-to-client data and ACKs._iS2cData
int _iS2cDataMessage counts: client-to-server data and ACKs, server-to-client data and ACKs._iS2cAck
int _iS2cAckMessage counts: client-to-server data and ACKs, server-to-client data and ACKs._sServerType
String _sServerTypeServer flavour, "web100" or "web10g", selects which messages the server understands._dS2cspd
double _dS2cspdMeasured speeds: server-to-client, client-to-server, and their slow-start phases._dC2sspd
double _dC2sspdMeasured speeds: server-to-client, client-to-server, and their slow-start phases._dSc2sspd
double _dSc2sspdMeasured speeds: server-to-client, client-to-server, and their slow-start phases._dSs2cspd
double _dSs2cspdMeasured speeds: server-to-client, client-to-server, and their slow-start phases._iSsndqueue
int _iSsndqueueServer send-queue length._dSbytes
double _dSbytesTotal bytes sent by the server._yabuff2Write
byte[] _yabuff2WriteScratch buffer for writing test data to the client._localeObj
Locale selected for the test display._resBundDisplayMsgs
Bundle of translated test messages._sLang
Language code for the display messages._sCountry
Country code for the display messages._sClient
Client type reported to the test server.half_duplex
int half_duplexHalf duplex.congestion
int congestionHalf duplex.bad_cable
int bad_cableHalf duplex.mismatch
int mismatchHalf duplex.mylink
double mylinkMeasured link speed.loss
double lossPacket loss rate.estimate
double estimatePacket loss rate.avgrtt
double avgrttPacket loss rate.spd
double spdPacket loss rate.waitsec
double waitsecPacket loss rate.timesec
double timesecPacket loss rate.rttsec
double rttsecPacket loss rate.order
double orderPacket ordering metric.rwintime
double rwintimePacket ordering metric.sendtime
double sendtimePacket ordering metric.cwndtime
double cwndtimePacket ordering metric.rwin
double rwinPacket ordering metric.swin
double swinPacket ordering metric.cwin
double cwinPacket ordering metric.aspd
double aspdAchievable speed._bIsApplication
boolean _bIsApplicationSet when the client is a native application rather than a browser._bTestInProgress
True while a bandwidth test is running.sHostName
String sHostNameServer host name used for the test.hostAddress
InetAddress hostAddressHost address._sTestResults
String _sTestResultsAccumulated human-readable test results and diagnostics._yTests
byte _yTestsBit mask of the tests to run: C2S, S2C, status and meta._iC2sSFWResult
int _iC2sSFWResultMiddlebox (firewall) verdict for the client-to-server test._iS2cSFWResult
int _iS2cSFWResultMiddlebox (firewall) verdict for the server-to-client test.pub_c2sspd
private double pub_c2sspdUpload speed from client to server, in Kbps.pub_s2cspd
private double pub_s2cspdDownload speed from server to client, in Kbps.pub_CurRwinRcvd
private int pub_CurRwinRcvdCurrent receive window advertised by the server.pub_MaxRwinRcvd
private int pub_MaxRwinRcvdLargest receive window advertised by the server.pub_MinRTT
private int pub_MinRTTShortest round trip time during the test, in ms.pub_MaxRTT
private int pub_MaxRTTLongest round trip time during the test, in ms.pub_loss
private double pub_lossPacket loss during the test, as a fraction.pub_avgrtt
private double pub_avgrttAverage round trip time during the test, in ms.pub_MinRTO
private int pub_MinRTOShortest retransmission timeout during the test.pub_MaxRTO
private int pub_MaxRTOLongest retransmission timeout during the test.pub_CurRTO
private int pub_CurRTOCurrent retransmission timeout during the test.pub_SACKsRcvd
private int pub_SACKsRcvdSelective acknowledgements received during the test.pub_osVer
Client OS version reported by the plugin.pub_pluginVer
Client plugin version reported to the server.pub_host
Client host name reported to the server.pub_osName
Client OS name reported to the server.pub_osArch
Client OS architecture reported to the server.pub_mismatch
private int pub_mismatchFlag for a client-server version mismatch.pub_Bad_cable
private int pub_Bad_cableFlag for a bad cable modem condition.pub_congestion
private int pub_congestionFlag for network congestion during the test.pub_cwndtime
private double pub_cwndtimeShare of the test spent in congestion window growth.pub_pctRcvrLimited
private double pub_pctRcvrLimitedShare of the test limited by the receiver.pub_AccessTech
Client access technology, such as cable or DSL.pub_natBox
Client NAT box type reported by the plugin.pub_DupAcksOut
private int pub_DupAcksOutDuplicate acknowledgements sent during the test.pub_DupAcksIn
private int pub_DupAcksInDuplicate acknowledgements received during the test.pub_TimeStamp
When the test finished.pub_clientIP
Client IP address as seen by the server.pub_Timeouts
private int pub_TimeoutsRetransmission timeouts during the test.pub_errmsg
Error message from the test, if it failed.pub_diagnosis
Diagnosis of what limited the test result.pub_statistics
Test statistics formatted for display.pub_status
Status string shown to the test UI.pub_time
private double pub_timeElapsed time of the test, in seconds.pub_bytes
private long pub_bytesBytes transferred during the test._sIsAutoRun
Parameter telling the applet to run automatically._sUserAgent
Browser user agent string, if supplied.jsonSupport
private boolean jsonSupportWhether the server supports JSON results.retry
private boolean retryWhether to retry a failed test._displayStatus
Status text shown in the applet._context
The app context._log
Logger for the test._useSSL
private final boolean _useSSLWhether the test connects over SSL._sslFactory
Factory for the SSL test sockets._sPanel
Panel showing the test status._thread_group
Thread group holding the test threads.
Constructor Details
Tcpbw100
public Tcpbw100(boolean useSSL) Tcpbw100.- Parameters:
useSSL- true to run the test over SSL, loading the certificates/ndt keystore
Method Details
main
Public static void main for invoking as an Application.- Parameters:
args- String array of command line arguments- Throws:
IllegalArgumentException- on bad hostname
mainSupport
Builds and shows the applet in a 700x320 window from the command line.- Parameters:
args- -s to use SSL, then the hostname and an optional client id- Returns:
- the started applet, already shown in its own window
- Throws:
IllegalArgumentException- on bad hostname
get_c2sspd
Measured upload (client-to-server) speed as a plain decimal string.- Returns:
- the outbound throughput in MiB using base 10, 0 until a test runs
get_s2cspd
Measured download (server-to-client) speed as a plain decimal string.- Returns:
- the inbound throughput in MiB using base 10, 0 until a test runs
get_CurRwinRcvd
Returns the current TCP receive window the server reported, in bytes.- Returns:
- the current TCP receive window in bytes, 0 until the server reports it
get_MaxRwinRcvd
Returns the largest receive window the server reported, in bytes.- Returns:
- the largest receive window seen in bytes, 0 until the server reports it
get_Ping
Returns the minimum round trip time the server reported, in milliseconds.- Returns:
- the minimum round trip time in milliseconds, 0 until the server reports it
get_MaxRTT
Returns the largest round trip time the server reported, in milliseconds.- Returns:
- the maximum round trip time in milliseconds, 0 until the server reports it
get_loss
Returns the packet loss the server reported, as a fraction from 0 to 1.- Returns:
- the packet loss as a fraction from 0 to 1, 0 until the server reports it
get_avgrtt
Returns the average round trip time the server reported, in milliseconds.- Returns:
- the average round trip time in milliseconds, 0 until the server reports it
get_CurRTO
Returns the current retransmission timeout the server reported, in milliseconds.- Returns:
- the current retransmission timeout in milliseconds, 0 until reported
get_SACKsRcvd
Returns the count of selective acknowledgement packets the client received.- Returns:
- the number of selective acknowledgement packets received
get_osVer
Returns the operating system version the client reported.- Returns:
- the client OS version, "unknown" until the client reports it
get_pluginVer
Returns the plugin version the client reported.- Returns:
- the client plugin version, "unknown" until the client reports it
get_host
Returns the host name this applet is pointed at.- Returns:
- the host the test ran against, "unknown" until set
get_osName
Returns the operating system name the client reported.- Returns:
- the client OS name, "unknown" until the client reports it
get_osArch
Returns the operating system architecture the client reported.- Returns:
- the client OS architecture, "unknown" until the client reports it
get_mismatch
Reports whether the server saw a speed mismatch between the two directions.- Returns:
- "yes" if the server reported a speed mismatch, otherwise "no"
get_Bad_cable
Reports whether the server flagged the link as a bad cable.- Returns:
- "yes" if the server flagged a bad cable, otherwise "no"
get_congestion
Reports whether the server flagged congestion on the link.- Returns:
- "yes" if the server flagged congestion, otherwise "no"
get_cwndtime
Returns the fraction of the run limited by the congestion window.- Returns:
- the fraction of the run spent limited by the congestion window
get_AccessTech
Returns the access technology the server detected for the link.- Returns:
- the access technology the server detected, "unknown" until reported
get_rcvrLimiting
Returns the percentage of the run the receive buffer was too small.- Returns:
- the percentage of the run the receive buffer was too small
get_optimalRcvrBuffer
Suggests a receive buffer size in KiB, derived from the largest window seen.- Returns:
- the largest receive window scaled by 1024, the suggested buffer size in KiB
get_clientIP
Returns the client address the server saw, as text.- Returns:
- the client IP as the server saw it, "unknown" until reported
get_natStatus
Returns the NAT type the server detected for this client.- Returns:
- the NAT type the server detected, "unknown" until reported
get_DupAcksOut
Returns the count of duplicate acknowledgements the client sent.- Returns:
- the number of duplicate acknowledgements sent
get_DupAcksIn
Returns the count of duplicate acknowledgements the client received.- Returns:
- the number of duplicate acknowledgements received
get_TimeStamp
Returns the clock stamp the server sent, or the word unknown when absent.- Returns:
- the server timestamp, or "unknown" if it sent none
get_PcBuffSpdLimit
Returns the throughput ceiling the receive window over round trip time sets.- Returns:
- the throughput ceiling the local receive buffer imposes, in bytes per second
get_jitter
Returns the spread between the largest and smallest round trip times, in milliseconds.- Returns:
- the spread between the maximum and minimum round trip times, in milliseconds
get_WaitSec
Estimates the stall time in seconds from the current timeout and its count.- Returns:
- the estimated stall time in seconds, the current RTO times the timeout count
get_errmsg
Returns the error text left behind by the most recent run.- Returns:
- the error from the last run, "Test not run." if there was none
get_diagnosis
Returns the diagnosis text left behind by the most recent run.- Returns:
- the diagnosis from the last run, "Test not run." if there was none
get_statistics
Returns the statistics summary left behind by the most recent run.- Returns:
- the statistics from the last run, "Test not run." if there was none
get_status
Returns the current run state, notStarted until a test begins.- Returns:
- the test status, "notStarted" until the run begins
get_instSpeed
Returns the speed measured since the last sample, in bits per millisecond.- Returns:
- the speed since the last sample, in bits per millisecond
getUserAgent
Set UserAgent String containing browser details.- Returns:
- String UserAgent details set locally
- See Also:
setUserAgent
Set UserAgent String.- Parameters:
paramStrUserAgent- UserAgent String to be set locally- See Also:
getC2sSFWTestResults
public int getC2sSFWTestResults()Get Client->Server fire-wall test results.- Returns:
- integer indicating C->S test results
setC2sSFWTestResults
public void setC2sSFWTestResults(int iParamC2SRes) Set Client->Server fire-wall test results.- Parameters:
iParamC2SRes- integer indicating C->S test results
getS2cSFWTestResults
public int getS2cSFWTestResults()Get Server->Client fire-wall test results.- Returns:
- integer indicating C->S test results
setS2cSFWTestResults
public void setS2cSFWTestResults(int iParamS2CRes) Set server->Client fire-wall test results.- Parameters:
iParamS2CRes- integer indicating C->S test results
isTestInProgress
public boolean isTestInProgress()Reports whether a test run is currently in progress.- Returns:
- whether a test run is in progress right now
run_test
public void run_test()"Remote Control" function - invoke NDT'runtest()method from the API.init
public void init()Initialize the base NDT window Appletinit()method.createMainWindow
private void createMainWindow()Initialize the "main" window. The main window is composed of 1. The results pane, which describes the process and displays their results 2. The buttons pane, which houses all the buttons for various options.createDiagnoseWindow
public void createDiagnoseWindow()Create the "More details" window.createStatsWindow
public void createStatsWindow()Create the "Statistics" window.runtest
public void runtest()Run the Thread that calls the "dottcp" method to run tests. This method is called by the Applet's init method if user selected an "autorun" option, is run individually if user presses the "start button", or, is internally invoked by the API call.actionPerformed
Action handler method called when an associated action is performed.- Parameters:
paramEventObj- Event object that prompted the call
showStatus
Display current status in Applet window.- Overrides:
showStatusin classJApplet- Parameters:
msg- String value of status
getStatus
I2P Translated status, not HTML escaped.- Returns:
- the current status line, localized and not HTML escaped
test_mid
Placeholder for the mid-link test; returns false without contacting the server.- Parameters:
paramProtoObj- Protocol Object used to exchange messages- Returns:
- boolean, true if test was not completed, false if test was completed.
- Throws:
IOException- when sending/receiving messages from server fails
test_sfw
Placeholder for the SFW firewall test; returns false without contacting the server.- Parameters:
protocolObj- Protocol Object used to exchange messages- Returns:
- boolean, true if test was not completed, false if test was completed.
- Throws:
IOException- when sending/receiving messages from server fails
test_c2s
Client to server throughput test. This test performs 10 seconds memory-to-memory data transfer to test achievable network bandwidth.- Parameters:
paramProtoObj- Protocol Object used to exchange messages- Returns:
- boolean, true if test was not completed, false if test was completed.
- Throws:
IOException- when sending/receiving messages from server fails- See Also:
test_s2c
S2C throughput test to measure network bandwidth from server to client.- Parameters:
paramProtoObj- Protocol Object used to exchange messagesparamSocketObj- Socket Object to write/read NDTProtocol control messages- Returns:
- boolean, true if test was not completed, false if test was completed.
- Throws:
IOException- When sending/receiving messages from server fails- See Also:
test_meta
The META test allows the Client to send an additional information to the Server that basically gets included along with the overall set of test results.- Parameters:
paramProtoObj- Protocol Object used to exchange protocol messagesapplication- the META information to send alongside the test results- Returns:
- boolean, true if test was completed, false if test is incomplete.
- Throws:
IOException- When sending/receiving messages from server fails- See Also:
dottcp
Method to run tests and interpret the results sent by the server.- Parameters:
sPanel- StatusPanel object to describe status of tests- Throws:
IOException- When sending/receiving messages from server fails- See Also:
newSocket
Return a SSL or standard socket depending on config.- Parameters:
hostAddress- the host to connect toctlPort- the control port to connect to- Returns:
- a connected socket, SSL or plain per
_useSSL - Throws:
IOException- if the connection fails
testResults
Method that interprets test results. This routine extracts the key-value pairs of results of various categories and assigns these to the correct variables. These values are then interpreted to make decisions about various measurement items and written to the main results, statistics or web100 panels.- Parameters:
sTestResParam- String containing all results
save_dbl_values
Save double values of various keys from the test results string.- Parameters:
sSysvarParam- key name (e.g. "bw:", "loss:")dSysvalParam- parsed double value
save_long_values
Save long values of various keys from the test results string.- Parameters:
sSysvarParam- key name (e.g. "DataBytesOut:")lSysvalParam- parsed long value
save_int_values
Save integer values of various keys from the test results string.- Parameters:
sSysvarParam- key name (e.g. "MSSSent:", "Timeouts:")iSysvalParam- parsed integer value
isValueSave
Check if the given key is one whose value is saved bysave_int_values(String, int), save_dbl_values(), or save_long_values().- Parameters:
sSysvarParam- key name string from test results- Returns:
- true if the key is recognized and saved
getParameter
Utility method to get parameter value.- Overrides:
getParameterin classJApplet- Parameters:
paramStrName- Key String whose value has to be found- Returns:
- String Value of key requested for
setsHostName
Sets the host name of the test server.- Parameters:
sHostName- the server host name
getNDTvar
parseMsgBodyToInt
Parse a message body string to an integer using base 10.- Parameters:
msg- string to parse- Returns:
- parsed value, or 0 on failure
parseMsgBodyToInt
Parse a message body string to an integer using the given radix.- Parameters:
msg- string to parseradix- numeric base (e.g. 10 or 16)- Returns:
- parsed value, or 0 on failure
killIt
public void killIt()Stop the test and kill its thread group. Only valid after the test was started viamain(String[])or runIt().runIt
public void runIt()Runs the configured tests on a daemon thread in a private daemon thread group, so an uncaught error is logged rather than reaching the default handler.