mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Tweak settings (and add SLEEP_BEFORE_ROUND) to speed up updates
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
This commit is contained in:
parent
a058344901
commit
9685a4db1f
1 changed files with 9 additions and 2 deletions
|
|
@ -82,14 +82,15 @@
|
|||
SOCKET_TIMEOUT = 2 #seconds
|
||||
|
||||
# The maximum chunk of data, in bytes, we would download in every round.
|
||||
CHUNK_SIZE = 8192 #bytes
|
||||
#CHUNK_SIZE = 8192 #bytes
|
||||
CHUNK_SIZE = 100000 #bytes
|
||||
|
||||
# The minimum average download speed (bytes/second) that must be met to
|
||||
# avoid being considered as a slow retrieval attack.
|
||||
MIN_AVERAGE_DOWNLOAD_SPEED = 100 #bytes/second
|
||||
|
||||
# The time (in seconds) we ignore a server with a slow initial retrieval speed.
|
||||
SLOW_START_GRACE_PERIOD = 3 #seconds
|
||||
SLOW_START_GRACE_PERIOD = 0.01 #seconds
|
||||
|
||||
# Software updaters that integrate the framework are required to specify
|
||||
# the URL prefix for the mirrors that clients can contact to download updates.
|
||||
|
|
@ -114,3 +115,9 @@
|
|||
# bin delegations. The other instances (e.g., digest of files) that require a
|
||||
# hashing algorithm rely on settings in the securesystemslib external library.
|
||||
DEFAULT_HASH_ALGORITHM = 'sha256'
|
||||
|
||||
# The client's update procedure (contained within a while-loop) can potentially
|
||||
# hog the CPU. The following setting can be used to force the update sequence
|
||||
# to suspend execution for a specified amount of time. See
|
||||
# theupdateframework/tuf/issue#338.
|
||||
SLEEP_BEFORE_ROUND = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue