| Trees | Indices | Help |
|
|---|
|
|
Limit the upload rate.
All the constants below are only for the automatic upload rate adjustment.
|
|||
|
RateLimiter Limit the upload rate. |
|||
|
|||
logging.Logger
|
logger = logging.getLogger('DebTorrent.RateLimiter')the logger to send all log messages to for this module |
||
float
|
MAX_RATE_PERIOD = 20.0maximum amount of time to guess the current rate estimate represents |
||
float
|
MAX_RATE = 100000000000.0the (very large) limit to use to not limit the upload rate |
||
float
|
PING_BOUNDARY = 1.2maximum ping time to consider still working |
||
int
|
PING_SAMPLES = 7minimum number of pings to require |
||
int
|
PING_DISCARDS = 1number of initial pings to discard |
||
int
|
PING_THRESHHOLD = 5number of pings that exceed PING_BOUNDARY before the connection is assumed to be flooded |
||
int
|
PING_DELAY = 5not used |
||
int
|
PING_DELAY_NEXT = 2not used |
||
float
|
ADJUST_UP = 1.05fraction to adjust up the upload rate by |
||
float
|
ADJUST_DOWN = 0.95fraction to adjust down the upload rate by |
||
int
|
UP_DELAY_FIRST = 5number of cycles after an adjust down before adjusting up the upload rate |
||
int
|
UP_DELAY_NEXT = 2number of cycles after an adjust up before adjusting up the upload rate again |
||
int
|
SLOTS_STARTING = 6the starting number of upload slots to use |
||
float
|
SLOTS_FACTOR = 0.00166factor to use in calculating the number of upload slots |
||
Imports: logging, binascii.b2a_hex, clock.clock, CurrentRateMeasure.Measure, cStringIO.StringIO, math.sqrt
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Sun Aug 19 16:26:53 2007 | http://epydoc.sourceforge.net |