GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit f531c57c authored by juga  's avatar juga 💬

fix: doc: Add differences between Torflow and sbws

Closes #33871.
parent 5a44410a
......@@ -385,6 +385,42 @@ Per relay scaled bandwidth rounding
Finally, the new scaled bandwidth is expressed in kilobytes and rounded a number
of digits.
Differences between Torflow aggregation and sbws scaling (May 2020)
-------------------------------------------------------------------
Torflow does not exclude relays because of having "few" measurements or "close"
to each other for that relay.
If there are not new measurements for a relay, Torflow uses the previous
calculated bandwidth, instead of the new value::
# If there is a new sample, let's use it for all but guards
if n.measured_at > prev_votes.vote_map[n.idhex].measured_at:
[snip]
else:
# Reset values. Don't vote/sample this measurement round.
n.revert_to_vote(prev_votes.vote_map[n.idhex])
The oldest measurements Toflow seems to take are from 4 weeks ago, while sbws
oldest measurements are 5 days old::
GUARD_SAMPLE_RATE = 2*7*24*60*60 # 2wks
[snip]
MAX_AGE = 2*GUARD_SAMPLE_RATE
[snip]
# old measurements are probably
# better than no measurements. We may not
# measure hibernating routers for days.
# This filter is just to remove REALLY old files
if time.time() - timestamp > MAX_AGE:
.. _README.spec.txt: https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/README.spec.txt
.. _PID Controller: https://en.wikipedia.org/wiki/PID_controller
.. _SQLSupport.py: https://gitweb.torproject.org/pytorctl.git/tree/SQLSupport.py#n493
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment