[tor-commits] [sbws/maint-1.1] fix: scanner: Log times kept
juga at torproject.org
juga at torproject.org
Tue Mar 16 14:17:53 UTC 2021
commit dc60a3c0215e28d8d32e9d0ffd4aa8872a8f70c3
Author: juga0 <juga at riseup.net>
Date: Wed Mar 3 09:42:38 2021 +0000
fix: scanner: Log times kept
not only the times that are not kept.
Closes #40060
---
sbws/core/scanner.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sbws/core/scanner.py b/sbws/core/scanner.py
index e446391..2fba10f 100644
--- a/sbws/core/scanner.py
+++ b/sbws/core/scanner.py
@@ -466,14 +466,17 @@ def _should_keep_result(did_request_maximum, result_time, download_times):
# In the normal case, we didn't ask for the maximum allowed amount. So we
# should only allow ourselves to keep results that are between the min and
# max allowed time
+ msg = "Keeping measurement time {:.2f}".format(result_time)
if not did_request_maximum and \
result_time >= download_times['min'] and \
result_time < download_times['max']:
+ log.debug(msg)
return True
# If we did request the maximum amount, we should keep the result as long
# as it took less than the maximum amount of time
if did_request_maximum and \
result_time < download_times['max']:
+ log.debug(msg)
return True
# In all other cases, return false
log.debug('Not keeping result time %f.%s', result_time,
More information about the tor-commits
mailing list