[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [metrics-web/master] Add .extradata files to the website.
commit dcb70de34b86bf114b8b5d2bcd67d6b2cc3b4ab5
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Wed Jan 26 17:14:19 2011 +0100
Add .extradata files to the website.
---
.../torproject/ernie/web/ResearchDataServlet.java | 9 +++++--
web/WEB-INF/data.jsp | 21 +++++++++++++++++--
2 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/src/org/torproject/ernie/web/ResearchDataServlet.java b/src/org/torproject/ernie/web/ResearchDataServlet.java
index 05edbb9..0c8efce 100644
--- a/src/org/torproject/ernie/web/ResearchDataServlet.java
+++ b/src/org/torproject/ernie/web/ResearchDataServlet.java
@@ -160,14 +160,17 @@ public class ResearchDataServlet extends HttpServlet {
url;
/* URL contains Torperf data file. */
- } else if (filename.endsWith("b.data")) {
+ } else if (filename.endsWith("b.data") ||
+ filename.endsWith("b.extradata")) {
+ boolean isExtraData = filename.endsWith("b.extradata");
String[] parts = filename.split("-");
if (parts.length != 2) {
continue;
}
String source = parts[0];
String filesize = parts[1];
- filesize = filesize.substring(0, filesize.length() - 5);
+ filesize = filesize.substring(0, filesize.length()
+ - (isExtraData ? 10 : 5));
if (!torperfFilesizes.contains(filesize)) {
continue;
}
@@ -177,7 +180,7 @@ public class ResearchDataServlet extends HttpServlet {
if (!torperfData.get(source).containsKey(filesize)) {
torperfData.get(source).put(filesize, new String[2]);
}
- torperfData.get(source).get(filesize)[0] = url;
+ torperfData.get(source).get(filesize)[isExtraData ? 1 : 0] = url;
/* URL contains exit list. */
} else if (filename.startsWith("exit-list-20")) {
diff --git a/web/WEB-INF/data.jsp b/web/WEB-INF/data.jsp
index 7561f37..7d660e0 100644
--- a/web/WEB-INF/data.jsp
+++ b/web/WEB-INF/data.jsp
@@ -187,17 +187,32 @@
<td>${item.key}</td>
<td>
<c:if test="${item.value['50kb'] ne null}" >
- <a href="${item.value['50kb'][0]}">50 KiB requests</a>
+ <c:if test="${item.value['50kb'][0] ne null}" >
+ <a href="${item.value['50kb'][0]}">50 KiB requests</a>
+ </c:if>
+ <c:if test="${item.value['50kb'][1] ne null}" >
+ <a href="${item.value['50kb'][1]}">50 KiB path info</a>
+ </c:if>
</c:if>
</td>
<td>
<c:if test="${item.value['1mb'] ne null}" >
- <a href="${item.value['1mb'][0]}">1 MiB requests</a>
+ <c:if test="${item.value['1mb'][0] ne null}" >
+ <a href="${item.value['1mb'][0]}">1 MiB requests</a>
+ </c:if>
+ <c:if test="${item.value['1mb'][1] ne null}" >
+ <a href="${item.value['1mb'][1]}">1 MiB path info</a>
+ </c:if>
</c:if>
</td>
<td>
<c:if test="${item.value['5mb'] ne null}" >
- <a href="${item.value['5mb'][0]}">5 MiB requests</a>
+ <c:if test="${item.value['5mb'][0] ne null}" >
+ <a href="${item.value['5mb'][0]}">5 MiB requests</a>
+ </c:if>
+ <c:if test="${item.value['5mb'][1] ne null}" >
+ <a href="${item.value['5mb'][1]}">5 MiB path info</a>
+ </c:if>
</c:if>
</td>
</tr>