1.. _differences:
2
3Differences between Torflow and sbws
4====================================
5
6(Last updated 2020-02-18)
7
8Aggregating measurements and scaling
9------------------------------------
10
11Filtering
12~~~~~~~~~
13
14Torflow does not exclude relays because of having "few" measurements or "close"
15to each other for that relay, like sbws does :ref:`filtering-measurements`.
16
17However this is currently disabled in sbws.
18
19Values from the previous Bandwidth File
20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21
22sbws is not reading the previous Bandwidth File, but scaling all the values
23with the raw measurements.
24
25Instead, Torflow uses the previous Bandwidth File values in some cases:
26
27- When a relay measurement is older than the one in the previous
28  Bandwidth File, it uses all the values from the previous Bandwidth File.
29  (how is possible that the Bandwidth File would have a newer measurements?)::
30
31    self.new_bw = prev_vote.bw * 1000
32
33Bandwidth File KeyValues
34~~~~~~~~~~~~~~~~~~~~~~~~
35
36sbws does not calculate nor write to the Bandwidth file the ``pid`` variables
37and KeyValues that are used in Torflow. Example of Torflow KeyValues not in sbws::
38
39  measured_at=1613547098 updated_at=1613547098 pid_error=11.275680184 pid_error_sum=11.275680184 pid_bw=23255048 pid_delta=11.0140582849 circ_fail=0.0
40
41sbws does not have ``measured_at`` and ``updated_at`` either.
42
43Currently the scaled bandwidth in Torflow does not depend on those extra values
44and they seem to be just informative.
45