[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/master] Provide old relay stats in a single tarball.
commit e73815094c224dc79e2e73e89d89847e1c5a215e
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Wed Jun 15 15:36:29 2011 +0200
Provide old relay stats in a single tarball.
---
.../torproject/ernie/web/ResearchDataServlet.java | 31 +--------
web/WEB-INF/data.jsp | 66 +++++---------------
2 files changed, 18 insertions(+), 79 deletions(-)
diff --git a/src/org/torproject/ernie/web/ResearchDataServlet.java b/src/org/torproject/ernie/web/ResearchDataServlet.java
index cd39ee6..0cf1564 100644
--- a/src/org/torproject/ernie/web/ResearchDataServlet.java
+++ b/src/org/torproject/ernie/web/ResearchDataServlet.java
@@ -72,8 +72,7 @@ public class ResearchDataServlet extends HttpServlet {
String[] certs = new String[2];
SortedMap<Date, String[]> bridgeDescriptors =
new TreeMap<Date, String[]>(java.util.Collections.reverseOrder());
- SortedMap<String, Map<String, String[]>> relayStatistics =
- new TreeMap<String, Map<String, String[]>>();
+ String[] relayStatistics = new String[2];
SortedMap<String, Map<String, String[]>> torperfData =
new TreeMap<String, Map<String, String[]>>();
SortedMap<Date, String[]> exitLists =
@@ -151,33 +150,9 @@ public class ResearchDataServlet extends HttpServlet {
bridgeDescriptors.get(month)[index] = url;
/* URL contains relay statistics. */
- } else if (filename.startsWith("buffer-") ||
- filename.startsWith("dirreq-") ||
- filename.startsWith("entry-") ||
- (filename.startsWith("exit-") &&
- !filename.startsWith("exit-list-"))) {
- String[] parts = filename.split("-");
- if (parts.length != 3) {
- continue;
- }
- String type = parts[0];
- String nickname = parts[1];
- String fingerprint = parts[2];
- fingerprint = fingerprint.substring(0, 8);
+ } else if (filename.startsWith("relay-statistics.tar.bz2")) {
int index = filename.endsWith(".asc") ? 1 : 0;
- String nicknameAndFingerprint = nickname + " ("
- + fingerprint.toUpperCase() + ")";
- if (!relayStatistics.containsKey(nicknameAndFingerprint)) {
- relayStatistics.put(nicknameAndFingerprint,
- new HashMap<String, String[]>());
- }
- if (!relayStatistics.get(nicknameAndFingerprint).containsKey(
- type)) {
- relayStatistics.get(nicknameAndFingerprint).put(type,
- new String[2]);
- }
- relayStatistics.get(nicknameAndFingerprint).get(type)[index] =
- url;
+ relayStatistics[index] = url;
/* URL contains Torperf data file. */
} else if (filename.endsWith("b.data") ||
diff --git a/web/WEB-INF/data.jsp b/web/WEB-INF/data.jsp
index da4ceb4..85cd3cc 100644
--- a/web/WEB-INF/data.jsp
+++ b/web/WEB-INF/data.jsp
@@ -28,7 +28,6 @@
<li><a href="#relaydesc">Relay descriptor archives</a></li>
<li><a href="#bridgedesc">Bridge descriptor archives</a></li>
<li><a href="#bridgeassignments">Bridge pool assignments</a></li>
- <li><a href="#stats">Statistics produced by relays</a></li>
<li><a href="#performance">Performance data</a></li>
<li><a href="#exitlist">Exit lists</a></li>
</ul>
@@ -106,6 +105,21 @@
</c:if>
which is updated whenever new v3 certificates become available.</p>
</c:if>
+ <c:if test="${relayStatistics[0] ne null}">
+ <br>
+ <p>Some of the relays are configured to gather statistics on the
+ number of requests or connecting clients, the number of
+ processed cells per queue, or the number of exiting bytes per
+ port. Relays running version 0.2.2.4-alpha or higher can include
+ these statistics in extra-info descriptors, so that they are
+ included in the relay descriptor archives. This
+ <a href="${relayStatistics[0]}">archive</a>
+ <c:if test="${relayStatistics[1] ne null}">
+ (<a href="${relayStatistics[1]}">sig</a>)
+ </c:if>
+ contains the statistics produced by relays running earlier
+ versions.</p>
+ </c:if>
<br>
<a name="bridgedesc"></a>
<h3>Bridge descriptor archives</h3>
@@ -155,56 +169,6 @@
</c:forEach>
</table>
<br>
- <a name="stats"></a>
- <h3>Statistics produced by relays</h3>
- <br>
- <p>Some of the relays are configured to gather statistics on the
- number of requests or connecting clients, the number of processed
- cells per queue, or the number of exiting bytes per port. Relays
- running version 0.2.2.4-alpha can include these statistics in
- extra-info descriptors, so that they are included in the relay
- descriptor archives. The following files contain the statistics
- produced by relays running earlier versions:</p>
- <table width="100%" border="0" cellpadding="5" cellspacing="0" summary="">
- <c:forEach var="item" items="${relayStatistics}" >
- <tr>
- <td>${item.key}</td>
- <td>
- <c:if test="${item.value['buffer'] ne null}" >
- <a href="${item.value['buffer'][0]}">buffer-stats</a>
- <c:if test="${item.value['buffer'][1] ne null}">
- (<a href="${item.value['buffer'][1]}">sig</a>)
- </c:if>
- </c:if>
- </td>
- <td>
- <c:if test="${item.value['dirreq'] ne null}" >
- <a href="${item.value['dirreq'][0]}">dirreq-stats</a>
- <c:if test="${item.value['dirreq'][1] ne null}">
- (<a href="${item.value['dirreq'][1]}">sig</a>)
- </c:if>
- </c:if>
- </td>
- <td>
- <c:if test="${item.value['entry'] ne null}" >
- <a href="${item.value['entry'][0]}">entry-stats</a>
- <c:if test="${item.value['entry'][1] ne null}">
- (<a href="${item.value['entry'][1]}">sig</a>)
- </c:if>
- </c:if>
- </td>
- <td>
- <c:if test="${item.value['exit'] ne null}" >
- <a href="${item.value['exit'][0]}">exit-stats</a>
- <c:if test="${item.value['exit'][1] ne null}">
- (<a href="${item.value['exit'][1]}">sig</a>)
- </c:if>
- </c:if>
- </td>
- </tr>
- </c:forEach>
- </table>
- <br>
<a name="performance"></a>
<h3>Performance data</h3>
<br>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits