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
50a2e605
Commit
50a2e605
authored
Oct 28, 2018
by
juga
Browse files
Debug time it takes each measurements iteration
parent
24a1a412
Changes
1
Hide whitespace changes
Inline
Side-by-side
sbws/core/scanner.py
View file @
50a2e605
...
...
@@ -344,7 +344,10 @@ def run_speedtest(args, conf):
pool
=
Pool
(
max_pending_results
)
pending_results
=
[]
while
True
:
num_relays
=
0
loop_tstart
=
time
.
time
()
for
target
in
rp
.
best_priority
():
num_relays
+=
1
log
.
debug
(
'Measuring %s %s'
,
target
.
nickname
,
target
.
fingerprint
[
0
:
8
])
callback
=
result_putter
(
rd
)
...
...
@@ -360,6 +363,9 @@ def run_speedtest(args, conf):
while
len
(
pending_results
)
>
0
:
time
.
sleep
(
5
)
pending_results
=
[
r
for
r
in
pending_results
if
not
r
.
ready
()]
loop_tstop
=
time
.
time
()
loop_tdelta
=
(
loop_tstop
-
loop_tstart
)
/
60
log
.
debug
(
"Measured %s relays in %s minutes"
,
num_relays
,
loop_tdelta
)
def
gen_parser
(
sub
):
...
...
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