[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-web/master] Document changes to the totalcw graph.



commit ffaab885748c5340b01ad87ddb88819cd779c2b0
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Thu Nov 29 11:53:41 2018 +0100

    Document changes to the totalcw graph.
    
    Still part of #28137, #28328, and #28352.
---
 .../resources/web/jsps/reproducible-metrics.jsp    | 22 ++++++++++++++++++----
 src/main/resources/web/jsps/stats.jsp              |  6 +++---
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/main/resources/web/jsps/reproducible-metrics.jsp b/src/main/resources/web/jsps/reproducible-metrics.jsp
index b6df6c3..24bdba0 100644
--- a/src/main/resources/web/jsps/reproducible-metrics.jsp
+++ b/src/main/resources/web/jsps/reproducible-metrics.jsp
@@ -380,7 +380,18 @@ The goal is to avoid over-representing a few statuses during periods when the br
 <li>Total consensus weights across bandwidth authorities <a href="/totalcw.html" class="btn btn-primary btn-xs"><i class="fa fa-chevron-right" aria-hidden="true"></i> graph</a></li>
 </ul>
 
-<h4>Step 1: Parse votes.</h4>
+<h4>Step 1: Parse consensuses.</h4>
+
+<p>Obtain consensuses from <a href="/collector.html#type-network-status-consensus-3">CollecTor</a>.
+Refer to the <a href="https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt";>Tor directory protocol, version 3</a> for details on the descriptor format.</p>
+
+<p>Parse and memorize the <code>"valid-after"</code> time from the consensus header. We use this UTC timestamp to aggregate by the UTC date.</p>
+
+<p>Parse the <code>"s"</code> lines of all status entries and skip entries without the <code>"Running"</code> flag. Optionally distinguish relays by assigned <code>"Guard"</code> and <code>"Exit"</code> flags.</p>
+
+<p>Parse the (optional) <code>"w"</code> lines of all status entries and compute the total of all bandwidth values denoted by the <code>"Bandwidth="</code> keyword. If an entry does not contain such a value, skip the entry. If a consensus does not contain a single bandwidth value, skip the consensus.</code>
+
+<h4>Step 2: Parse votes.</h4>
 
 <p>Obtain votes from <a href="/collector.html#type-network-status-vote-3">CollecTor</a>.
 Refer to the <a href="https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt";>Tor directory protocol, version 3</a> for details on the descriptor format.</p>
@@ -389,11 +400,14 @@ Refer to the <a href="https://gitweb.torproject.org/torspec.git/tree/dir-spec.tx
 
 <p>Also parse the <code>"nickname"</code> and <code>"identity"</code> fields from the <code>"dir-source"</code> line. We use the identity to aggregate by authority and the nickname for display purposes.</p>
 
-<p>Parse the (optional) <code>"w"</code> lines of all status entries and compute the total of all measured bandwidth values denoted by the <code>"Measured="</code> keyword. If an entry does not contain such a value, skip the entry. If a vote does not contain a single measured bandwidth value, skip the vote.</code>
+<p>Parse the <code>"s"</code> lines of all status entries and skip entries without the <code>"Running"</code> flag. Optionally distinguish relays by assigned <code>"Guard"</code> and <code>"Exit"</code> flags.</p>
 
-<h4>Step 2: Compute daily averages</h4>
+<p>Parse the (optional) <code>"w"</code> lines of all status entries and compute the total of all measured bandwidth values denoted by the <code>"Measured="</code> keyword. If an entry does not contain such a value, skip the entry. If a vote does not contain a single measured bandwidth value, skip the vote.</p>
+
+<h4>Step 3: Compute daily averages</h4>
 
-<p>Go through all previously processed votes by valid-after UTC date and authority.
+<p>Go through all previously processed consensuses and votes by valid-after UTC date and authority.
+If there are less than 12 consensuses known for a given UTC date, skip consensuses from this date.
 If an authority published less than 12 votes on a given UTC date, skip this date and authority.
 Also skip the last date of the results, because those averages may still change throughout the day.
 For all remaining combinations of date and authority, compute the arithmetic mean of total measured bandwidth, rounded down to the next-smaller integer number.</p>
diff --git a/src/main/resources/web/jsps/stats.jsp b/src/main/resources/web/jsps/stats.jsp
index 002a3af..e5f9c6a 100644
--- a/src/main/resources/web/jsps/stats.jsp
+++ b/src/main/resources/web/jsps/stats.jsp
@@ -321,9 +321,9 @@ Servers <a href="#servers" name="servers" class="anchor">#</a></h2>
 <h4>Columns</h4>
 
 <ul>
-<li><b>date:</b> UTC date (YYYY-MM-DD) when bridges have been listed as running.</li>
-<li><b>nickname:</b> Bandwidth authority nickname.</li>
-<li><b>totalcw:</b> Total consensus weight of all relays measured by the bandwidth authority.</li>
+<li><b>date:</b> UTC date (YYYY-MM-DD) when relays have been listed as running.</li>
+<li><b>nickname:</b> Bandwidth authority nickname, or the empty string in case of the consensus.</li>
+<li><b>totalcw:</b> Total consensus weight of all running relays measured by the bandwidth authority or contained in the consensus.</li>
 </ul>
 
 </div>

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits