[or-cvs] [metrics-utils/master 2/2] Don't omit the stats for the last date in the output.

karsten at torproject.org karsten at torproject.org
Tue Oct 19 16:56:56 UTC 2010


Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Tue, 19 Oct 2010 18:56:03 +0200
Subject: Don't omit the stats for the last date in the output.
Commit: 92a8804e238960b970e5afd1ba235470a1d1c073

Found by Kiyoto Tamura.
---
 visitor/ChangeLog    |    4 ++++
 visitor/VisiTor.java |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/visitor/ChangeLog b/visitor/ChangeLog
index 2ca3f2c..aef34db 100644
--- a/visitor/ChangeLog
+++ b/visitor/ChangeLog
@@ -1,5 +1,9 @@
 VisiTor change log:
 
+Changes in version 0.0.4 - 2010-1?-??
+  - Don't omit the stats for the last date in the output. Found by Kiyoto
+    Tamura.
+
 Changes in version 0.0.3 - 2010-09-24
   - Support parsing .gz-compressed web server logs. Suggested by murb.
   - Support reading decompressed web server log from stdin. Suggested by
diff --git a/visitor/VisiTor.java b/visitor/VisiTor.java
index 2cde49a..8bdb3ff 100644
--- a/visitor/VisiTor.java
+++ b/visitor/VisiTor.java
@@ -310,7 +310,7 @@ public final class VisiTor {
       }
       bw.write("\n");
       String currentDate = allDates.first(), lastDate = allDates.last();
-      while (currentDate.compareTo(lastDate) < 0) {
+      while (currentDate.compareTo(lastDate) <= 0) {
         if (!torRequests.containsKey(currentDate) &&
             !nonTorRequests.containsKey(currentDate)) {
           bw.write(currentDate + ",NA,NA");
-- 
1.7.1



More information about the tor-commits mailing list