[tor-commits] [sbws/master] docs: explain how the relays are measured

juga at torproject.org juga at torproject.org
Sat Feb 23 10:57:25 UTC 2019


commit eb19c15d72f1a1afa1b917ecd93f2abfb4bc9ee9
Author: juga0 <juga at riseup.net>
Date:   Thu Feb 7 10:43:45 2019 +0000

    docs: explain how the relays are measured
---
 docs/source/activity_all.puml       | 25 +++++++++++++++++++++++++
 docs/source/images/activity_all.svg |  1 +
 docs/source/specification.rst       | 15 +++++++++++++++
 3 files changed, 41 insertions(+)

diff --git a/docs/source/activity_all.puml b/docs/source/activity_all.puml
new file mode 100644
index 0000000..225dd64
--- /dev/null
+++ b/docs/source/activity_all.puml
@@ -0,0 +1,25 @@
+ at startuml
+
+start
+
+while (no SIGINT/SIGTERM?)
+
+  while (next relay to measure?)
+
+    :Select a destination;
+
+    :Select a second relay;
+
+    :Build a circuit;
+
+    :HTTP GET (Range-Bytes);
+
+    :Store measurement;
+
+  endwhile
+
+endwhile
+
+stop
+
+ at enduml
\ No newline at end of file
diff --git a/docs/source/images/activity_all.svg b/docs/source/images/activity_all.svg
new file mode 100644
index 0000000..b97e56c
--- /dev/null
+++ b/docs/source/images/activity_all.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="479px" preserveAspectRatio="none" style="width:256px;height:479px;" version="1.1" viewBox="0 0 256 479" width="256px" zoomAndPan="magnify"><defs><filter height="300%" id="f8gvh59" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><ellipse cx="145.5" cy="20" fill="#000000" filter="url(#f8gvh59)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f8gvh59)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="146" x="72.5" y=
 "138"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="126" x="82.5" y="159.1387">Select a destination</text><rect fill="#FEFECE" filter="url(#f8gvh59)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="155" x="68" y="191.9688"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="135" x="78" y="213.1074">Select a second relay</text><rect fill="#FEFECE" filter="url(#f8gvh59)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="104" x="93.5" y="246.9531"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="84" x="103.5" y="268.0918">Build a circuit</text><rect fill="#FEFECE" filter="url(#f8gvh59)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="171" x="60" y="300.9219"/><text fill="#000000" font-family="sans-seri
 f" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="151" x="70" y="322.0605">HTTP GET (Range-Bytes)</text><rect fill="#FEFECE" filter="url(#f8gvh59)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="145" x="73" y="354.8906"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="125" x="83" y="376.0293">Store measurement</text><polygon fill="#FEFECE" filter="url(#f8gvh59)" points="79.5,94,211.5,94,223.5,106,211.5,118,79.5,118,67.5,106,79.5,94" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="132" x="79.5" y="109.8081">next relay to measure?</text><polygon fill="#FEFECE" filter="url(#f8gvh59)" points="87.5,50,203.5,50,215.5,62,203.5,74,87.5,74,75.5,62,87.5,50" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAn
 dGlyphs" textLength="116" x="87.5" y="65.8081">no SIGINT/SIGTERM?</text><ellipse cx="145.5" cy="462.8594" fill="none" filter="url(#f8gvh59)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="146" cy="463.3594" fill="#000000" filter="url(#f8gvh59)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="145.5" x2="145.5" y1="171.9688" y2="191.9688"/><polygon fill="#A80036" points="141.5,181.9688,145.5,191.9688,149.5,181.9688,145.5,185.9688" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="145.5" x2="145.5" y1="225.9375" y2="246.9531"/><polygon fill="#A80036" points="141.5,236.9531,145.5,246.9531,149.5,236.9531,145.5,240.9531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="145.5" x2="145.5" y1="280.9219" y2="300.9219"/><polygon fill="#A80036" points="141.5,290.9219,145.5,300.9219,149.5,290.9219,145.5,294.921
 9" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="145.5" x2="145.5" y1="334.8906" y2="354.8906"/><polygon fill="#A80036" points="141.5,344.8906,145.5,354.8906,149.5,344.8906,145.5,348.8906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="145.5" x2="145.5" y1="118" y2="138"/><polygon fill="#A80036" points="141.5,128,145.5,138,149.5,128,145.5,132" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="145.5" x2="145.5" y1="388.8594" y2="398.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="145.5" x2="243" y1="398.8594" y2="398.8594"/><polygon fill="#A80036" points="239,261.9375,243,251.9375,247,261.9375,243,257.9375" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="243" x2="243" y1="106" y2="398.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="243" x2="223.5" y1="106" 
 y2="106"/><polygon fill="#A80036" points="233.5,102,223.5,106,233.5,110,229.5,106" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="67.5" x2="48" y1="106" y2="106"/><polygon fill="#A80036" points="44,247.9375,48,257.9375,52,247.9375,48,251.9375" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="48" x2="48" y1="106" y2="410.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="48" x2="255" y1="410.8594" y2="410.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="255" x2="255" y1="62" y2="410.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="255" x2="215.5" y1="62" y2="62"/><polygon fill="#A80036" points="225.5,58,215.5,62,225.5,66,221.5,62" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="145.5" x2="145.5" y1="74" y2="94"/><polygon fill="#A80036" points="141.5,84,145.5,94,149.5,84,145.5,88" style="stroke: #A800
 36; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="75.5" x2="24" y1="62" y2="62"/><polygon fill="#A80036" points="20,235.9375,24,245.9375,28,235.9375,24,239.9375" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="24" x2="24" y1="62" y2="432.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="24" x2="145.5" y1="432.8594" y2="432.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="145.5" x2="145.5" y1="432.8594" y2="452.8594"/><polygon fill="#A80036" points="141.5,442.8594,145.5,452.8594,149.5,442.8594,145.5,446.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="145.5" x2="145.5" y1="30" y2="50"/><polygon fill="#A80036" points="141.5,40,145.5,50,149.5,40,145.5,44" style="stroke: #A80036; stroke-width: 1.0;"/></g></svg>
\ No newline at end of file
diff --git a/docs/source/specification.rst b/docs/source/specification.rst
index 83c7467..1e5b683 100644
--- a/docs/source/specification.rst
+++ b/docs/source/specification.rst
@@ -116,6 +116,21 @@ Classes used in the initialization:
 
 Source code: :func:`sbws.core.scanner.run_speedtest`
 
+Measuring relays
+~~~~~~~~~~~~~~~~~
+
+#. For every relay:
+#. Select a second relay to build a Tor circuit.
+#. Build the circuit.
+#. Make HTTPS GET requests to the Web server over the circuit.
+#. Store the time the request took and the amount of bytes requested.
+
+.. image:: ./images/activity_all.svg
+   :alt: activity measuring relays
+   :height: 300px
+   :align: center
+
+Source code: :func:`sbws.core.scanner.measure_relay`
 
 Simple result storage
 ~~~~~~~~~~~~~~~~~~~~~





More information about the tor-commits mailing list