commit d1c7054f18bc947251293a776405880163d23d1e Author: Karsten Loesing karsten.loesing@gmx.net Date: Tue Jul 31 14:17:06 2012 +0200
Normalize bwhist by flags to B/sec, not B/day. --- rserve/csv.R | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/rserve/csv.R b/rserve/csv.R index 8eb69fe..57f728d 100644 --- a/rserve/csv.R +++ b/rserve/csv.R @@ -94,7 +94,8 @@ export_bandwidth <- function(path) { export_bwhist_flags <- function(path) { drv <- dbDriver("PostgreSQL") con <- dbConnect(drv, user = dbuser, password = dbpassword, dbname = db) - q <- paste("SELECT date, isexit, isguard, read, written", + q <- paste("SELECT date, isexit, isguard, read / 86400 AS read,", + "written / 86400 AS written", "FROM bwhist_flags WHERE date < current_date - 1", "ORDER BY date, isexit, isguard") rs <- dbSendQuery(con, q)
tor-commits@lists.torproject.org