Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
sbws
Commits
dc60a3c0
Commit
dc60a3c0
authored
Mar 03, 2021
by
juga
Browse files
fix: scanner: Log times kept
not only the times that are not kept. Closes
#40060
parent
fa70b0a1
Pipeline
#3592
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
sbws/core/scanner.py
View file @
dc60a3c0
...
...
@@ -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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment