Class PingSourceStats
- java.lang.Object
-
- com.biglybt.core.speedmanager.impl.v2.PingSourceStats
-
public class PingSourceStats extends java.lang.Object
Keeps the ping time stats for a single source. Should calculate averages for the data.
-
-
Constructor Summary
Constructors Constructor Description PingSourceStats(SpeedManagerPingSource _source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPingTime(int ping)
Average
getHistory()
Get the average that should be used for checking ping times.Average
getLongTermAve()
Get the long-term average.int
getTrend()
Speculative method to see if it can determine a trend.void
madeChange()
-
-
-
Field Detail
-
source
final SpeedManagerPingSource source
-
currPing
double currPing
-
shortTerm
final Average shortTerm
-
medTerm
final Average medTerm
-
longTerm
final Average longTerm
-
forChecks
final Average forChecks
-
-
Constructor Detail
-
PingSourceStats
public PingSourceStats(SpeedManagerPingSource _source)
-
-
Method Detail
-
madeChange
public void madeChange()
-
addPingTime
public void addPingTime(int ping)
-
getTrend
public int getTrend()
Speculative method to see if it can determine a trend. The larger the number the stronger the trend.- Returns:
- current - interger. A positive number is an increasing trend. A negative number is a decreasing trend.
-
getLongTermAve
public Average getLongTermAve()
Get the long-term average.- Returns:
- Average - longTerm
-
getHistory
public Average getHistory()
Get the average that should be used for checking ping times.- Returns:
- - ping time of history.
-
-