org.alliance.core.comm
Class BandwidthAnalyzer

java.lang.Object
  extended by org.alliance.core.comm.BandwidthAnalyzer

public class BandwidthAnalyzer
extends java.lang.Object

Created by IntelliJ IDEA. User: maciek Date: 2006-jan-29 Time: 16:51:59 To change this template use File | Settings | File Templates.


Field Summary
static int INNER_INVERVAL
           
static int OUTER_INTERVAL
           
 
Constructor Summary
BandwidthAnalyzer()
           
BandwidthAnalyzer(int updateInterval)
           
BandwidthAnalyzer(int updateInterval, int highestCps)
           
 
Method Summary
 double getAverageCps()
           
 double getCPS()
           
 double getHighestCPS()
           
 java.lang.String getHighestCPSHumanReadable()
           
 java.lang.String getHumanReadable()
           
static java.lang.String getHumanReadable(double cps)
           
 long getTotalBytes()
           
 boolean hasGoodAverage()
           
 void update(int bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INNER_INVERVAL

public static final int INNER_INVERVAL
See Also:
Constant Field Values

OUTER_INTERVAL

public static final int OUTER_INTERVAL
See Also:
Constant Field Values
Constructor Detail

BandwidthAnalyzer

public BandwidthAnalyzer(int updateInterval)

BandwidthAnalyzer

public BandwidthAnalyzer()

BandwidthAnalyzer

public BandwidthAnalyzer(int updateInterval,
                         int highestCps)
Method Detail

update

public void update(int bytes)

getCPS

public double getCPS()

getHumanReadable

public java.lang.String getHumanReadable()

getHumanReadable

public static java.lang.String getHumanReadable(double cps)

getHighestCPS

public double getHighestCPS()

getHighestCPSHumanReadable

public java.lang.String getHighestCPSHumanReadable()

getTotalBytes

public long getTotalBytes()

getAverageCps

public double getAverageCps()

hasGoodAverage

public boolean hasGoodAverage()