Class SMConst
- java.lang.Object
-
- com.biglybt.core.speedmanager.impl.v2.SMConst
-
public class SMConst extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
SMConst.FilteredLimitEstimate
-
Field Summary
Fields Modifier and Type Field Description static int
MIN_DOWNLOAD_BYTES_PER_SEC
static int
MIN_UPLOAD_BYTES_PER_SEC
static int
RATE_UNLIMITED
static int
START_DOWNLOAD_RATE_MAX
static int
START_UPLOAD_RATE_MAX
-
Constructor Summary
Constructors Modifier Constructor Description private
SMConst()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
calculateMinDownload(int maxBytesPerSec)
static int
calculateMinUpload(int maxBytesPerSec)
Rule: Min value is alway 10% of max, but not below 5k.static int
checkForMinDownloadValue(int rateBytesPerSec)
static int
checkForMinUploadValue(int rateBytesPerSec)
No limit should go below 5k bytes/sec.static SpeedManagerLimitEstimate
filterEstimate(SpeedManagerLimitEstimate estimate, int startValue)
Early in the search process the ping-mapper can give estimates that are too low due to a lack of information.static int
filterLimit(int bytesPerSec, int startValue)
-
-
-
Field Detail
-
START_DOWNLOAD_RATE_MAX
public static final int START_DOWNLOAD_RATE_MAX
- See Also:
- Constant Field Values
-
START_UPLOAD_RATE_MAX
public static final int START_UPLOAD_RATE_MAX
- See Also:
- Constant Field Values
-
MIN_UPLOAD_BYTES_PER_SEC
public static final int MIN_UPLOAD_BYTES_PER_SEC
- See Also:
- Constant Field Values
-
MIN_DOWNLOAD_BYTES_PER_SEC
public static final int MIN_DOWNLOAD_BYTES_PER_SEC
- See Also:
- Constant Field Values
-
RATE_UNLIMITED
public static final int RATE_UNLIMITED
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkForMinUploadValue
public static int checkForMinUploadValue(int rateBytesPerSec)
No limit should go below 5k bytes/sec.- Parameters:
rateBytesPerSec
- -- Returns:
- - "bytes/sec" rate.
-
checkForMinDownloadValue
public static int checkForMinDownloadValue(int rateBytesPerSec)
-
calculateMinUpload
public static int calculateMinUpload(int maxBytesPerSec)
Rule: Min value is alway 10% of max, but not below 5k.- Parameters:
maxBytesPerSec
- -- Returns:
- - minRate.
-
calculateMinDownload
public static int calculateMinDownload(int maxBytesPerSec)
-
filterEstimate
public static SpeedManagerLimitEstimate filterEstimate(SpeedManagerLimitEstimate estimate, int startValue)
Early in the search process the ping-mapper can give estimates that are too low due to a lack of information. The starting upload and download limits is 60K/30K should not go below the starting value a slow DSL lines should.- Parameters:
estimate
- - download rate estimate.startValue
- - starting upload/download value.- Returns:
- -
-
filterLimit
public static int filterLimit(int bytesPerSec, int startValue)
-
-