Skip navigation links

Oracle® Coherence Java API Reference
v3.5.1

E15583-01


com.tangosol.net
Class DatagramTest.PacketTracker

java.lang.Object
  extended by com.tangosol.net.DatagramTest.PacketTracker

Enclosing class:
DatagramTest

protected static class DatagramTest.PacketTracker
extends java.lang.Object

Tracker of packet statistics for a single client.


Field Summary
protected  java.net.SocketAddress m_addrSender
           
protected  AtomicCounter m_atomicAckOut
           
protected  long m_cAcksIn
           
protected  long m_cBytesReceived
           
protected  long m_cGapMillis
           
protected  long m_cGapPackets
           
protected  long m_cGaps
           
protected  int m_cOutOfOrder
           
protected  int m_cPacketsRcvd
           
protected  long m_cTotalOutOfOrderOffset
           
protected  long m_lDeltaRttNanos
           
protected  long m_lLastPacketArrivalTime
           
protected  long m_lStartTime
           
protected  int m_nMax
           
protected  int m_nMin
           
protected  int m_nNext
           

 

Constructor Summary
DatagramTest.PacketTracker(java.net.SocketAddress addrSender)
          Construct a PacketTracker for the given client.

 

Method Summary
 long computeAverageOutOfOrderOffset()
          Compute the average out of order offset for packets which arrived out of order.
 int computeAveragePacketSize()
          Compute average packet size.
 long computeDurationMillis()
          Return the duration this tracker has been accumulating data for.
 int computeMissingPackets()
          Compute the number of missing packets.
 long computeRttNanos()
          Return the average round trip time of a packet in milliseconds.
 int computeSentPackets()
          Compute the number of packets sent by the publisher.
 float computeSuccessRate()
          Compute the success rate for receiveing packets.
 int computeThroughputMBPerSec()
          Compute the throughput in megabytes per second.
 int computeThroughputPacketsPerSec()
          Compute the throughput in megabytes per second.
static void generateReport(java.lang.String sPeriod, java.util.Map mapTracker)
          Generate a report for all PacketTrackers in the Map.
 java.lang.String getTabularReport()
          Return a report in tabular form.
static java.lang.String getTabularReportHeader()
          Return a header for a tabular report.
 void reset(long lTimeMs)
          Reset the counters.
 java.lang.String toString()
          Return a human readable report on the tracked data.
static java.lang.String toString(DatagramTest.PacketTracker[] aTracker)
          Return a summay report on multiple trackers.
 void trackArrival(int nCurrent, long ldtSentNanos, long ldtAckNanos, int cBytes)
          Track the arrival of a new packet.

 

Field Detail

m_addrSender

protected java.net.SocketAddress m_addrSender

m_atomicAckOut

protected AtomicCounter m_atomicAckOut

m_cPacketsRcvd

protected int m_cPacketsRcvd

m_lStartTime

protected long m_lStartTime

m_lLastPacketArrivalTime

protected long m_lLastPacketArrivalTime

m_nMin

protected int m_nMin

m_nMax

protected int m_nMax

m_nNext

protected int m_nNext

m_cOutOfOrder

protected int m_cOutOfOrder

m_cTotalOutOfOrderOffset

protected long m_cTotalOutOfOrderOffset

m_cBytesReceived

protected long m_cBytesReceived

m_cGaps

protected long m_cGaps

m_cGapPackets

protected long m_cGapPackets

m_cGapMillis

protected long m_cGapMillis

m_lDeltaRttNanos

protected long m_lDeltaRttNanos

m_cAcksIn

protected long m_cAcksIn

Constructor Detail

DatagramTest.PacketTracker

public DatagramTest.PacketTracker(java.net.SocketAddress addrSender)
Construct a PacketTracker for the given client.
Parameters:
addrSender - the address of the client

Method Detail

trackArrival

public void trackArrival(int nCurrent,
                         long ldtSentNanos,
                         long ldtAckNanos,
                         int cBytes)
Track the arrival of a new packet.
Parameters:
nCurrent - packet number
cBytes - packet size in bytes

reset

public void reset(long lTimeMs)
Reset the counters.
Parameters:
lTimeMs - the current time

computeDurationMillis

public long computeDurationMillis()
Return the duration this tracker has been accumulating data for.
Returns:
duration in milliseconds

computeRttNanos

public long computeRttNanos()
Return the average round trip time of a packet in milliseconds.
Returns:
the average packet round trip time

computeSentPackets

public int computeSentPackets()
Compute the number of packets sent by the publisher.
Returns:
the number of packets sent by the publisher

computeMissingPackets

public int computeMissingPackets()
Compute the number of missing packets.
Returns:
the number of missing packets

computeAverageOutOfOrderOffset

public long computeAverageOutOfOrderOffset()
Compute the average out of order offset for packets which arrived out of order.
Returns:
the average out of order offset

computeSuccessRate

public float computeSuccessRate()
Compute the success rate for receiveing packets.
Returns:
the success rate

computeThroughputMBPerSec

public int computeThroughputMBPerSec()
Compute the throughput in megabytes per second.
Returns:
return the computed throughput

computeThroughputPacketsPerSec

public int computeThroughputPacketsPerSec()
Compute the throughput in megabytes per second.
Returns:
return the computed throughput

computeAveragePacketSize

public int computeAveragePacketSize()
Compute average packet size.
Returns:
the average packet size received

getTabularReportHeader

public static java.lang.String getTabularReportHeader()
Return a header for a tabular report.
Returns:
a tabular report header

getTabularReport

public java.lang.String getTabularReport()
Return a report in tabular form.
Returns:
a report in tabular form

toString

public java.lang.String toString()
Return a human readable report on the tracked data.
Returns:
a human readable report

toString

public static java.lang.String toString(DatagramTest.PacketTracker[] aTracker)
Return a summay report on multiple trackers.
Parameters:
aTracker - an array of trackers which ran concurrently

generateReport

public static void generateReport(java.lang.String sPeriod,
                                  java.util.Map mapTracker)
Generate a report for all PacketTrackers in the Map.
Parameters:
sPeriod - description of the period the results cover
mapTracker - the map of trackers

Skip navigation links

Oracle® Coherence Java API Reference
v3.5.1

E15583-01


Copyright © 2000, 2009, Oracle. All rights reserved.