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

[or-cvs] [metrics-db/master] Don't try to parse Torperf's .extradata files yet.



commit f10d9445af2ef250a57ff606bfffa3aa5efcfaf3
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Wed Jan 26 16:22:23 2011 +0100

    Don't try to parse Torperf's .extradata files yet.
---
 src/org/torproject/ernie/db/TorperfProcessor.java |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/org/torproject/ernie/db/TorperfProcessor.java b/src/org/torproject/ernie/db/TorperfProcessor.java
index 8b21479..58e20d2 100644
--- a/src/org/torproject/ernie/db/TorperfProcessor.java
+++ b/src/org/torproject/ernie/db/TorperfProcessor.java
@@ -74,6 +74,9 @@ public class TorperfProcessor {
               receivedBytes *= 1024L;
             } else if (pop.getName().endsWith("mb.data")) {
               receivedBytes *= 1024L * 1024L;
+            } else {
+              // not a valid .data file
+              continue;
             }
             receivedBytes *= Long.parseLong(size.substring(0,
                 size.length() - "xb.data".length()));