Skip to content

Commit

Permalink
ATOR-295 - Adjust config
Browse files Browse the repository at this point in the history
  • Loading branch information
yumirkov committed Jun 1, 2024
1 parent e459e60 commit 75d1536
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/source/man_sbws.ini.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ logging
to_file_level = {debug, info, warning, error, critical}
Level to log at when using files. (Default: debug)
to_stdout_level = {debug, info, warning, error, critical}
Level to log at when using stdout. (Default: debug)
Level to log at when using stdout. (Default: info)
to_syslog_level = {debug, info, warning, error, critical}
Level to log at when using syslog. (Default: debug)
Level to log at when using syslog. (Default: info)
format = STR
Format string to use when logging.
(Default: %(asctime)s %(module)s[%(process)s]: <%(levelname)s> %(message)s)
Expand Down
18 changes: 9 additions & 9 deletions sbws/config.default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data_period = 10
# single float. Requests will use it both as the connect() timeout and the
# timeout between bytes received from the server. See
# http://docs.python-requests.org/en/master/user/advanced/#timeouts
http_timeout = 600
http_timeout = 300
# Timeout in seconds for waiting on a circuit to be built. It MUST be an
# **int**. We will use this both as the CircuitBuildTimeout and a timeout
# to give to stem for waiting on a circuit to be built since
Expand All @@ -46,17 +46,17 @@ dirauth_nickname = dirauth_nickname
# Limits on what download times are too fast/slow/etc.
download_toofast = 1
download_min = 5
download_target = 10
download_max = 100
download_target = 6
download_max = 10
# How many RTT measurements to make
num_rtts = 0
# Number of downloads with acceptable times we must have for a relay before
# moving on
num_downloads = 1
num_downloads = 3
# The number of bytes to initially request from the server
initial_read_request = 16384
# How many measurements to make in parallel
measurement_threads = 4
measurement_threads = 3
# Minimum number of bytes we should ever try to download in a measurement
min_download_size = 1
# Maximum number of bytes we should ever try to download in a measurement
Expand Down Expand Up @@ -124,10 +124,10 @@ to_file_max_bytes = 10485760
to_file_num_backups = 50
# Level to log at. Debug, info, warning, error, critical.
# `level` must be set to the lower of all the handler levels.
level = info
to_file_level = info
to_stdout_level = info
to_syslog_level = info
level = debug
to_file_level = debug
to_stdout_level = debug
to_syslog_level = debug
# Format string to use when logging
format = %(asctime)s %(module)s[%(process)s]: <%(levelname)s> (%(threadName)s) %(message)s
to_stdout_format = ${format}
Expand Down
6 changes: 2 additions & 4 deletions sbws/core/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def measure_rtt_to_server(session, conf, dest, content_length):
rtts = []
size = conf.getint("scanner", "min_download_size")
for _ in range(0, conf.getint("scanner", "num_rtts")):
log.debug("Measuring RTT to %s", dest.url)
log.info("Measuring RTT to %s", dest.url)
random_range = get_random_range_string(content_length, size)
success, data = timed_recv_from_server(session, dest, random_range)
if not success:
Expand Down Expand Up @@ -556,10 +556,8 @@ def measure_relay(args, conf, destinations, cb, rl, relay):
"""
log.debug("Measuring %s %s", relay.nickname, relay.fingerprint)
our_nick = conf["scanner"]["nickname"]
timeout = conf.getfloat("general", "http_timeout")
log.error("Timeout is set to %s", timeout)
s = requests_utils.make_session(
cb.controller, timeout
cb.controller, conf.getfloat("general", "http_timeout")
)
# Probably because the scanner is stopping.
if s is None:
Expand Down

0 comments on commit 75d1536

Please sign in to comment.