[or-cvs] [metrics-web/master] Change bandwidth graph to display advertised bandwidth.

karsten at torproject.org karsten at torproject.org
Tue Sep 21 13:36:11 UTC 2010


Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Tue, 21 Sep 2010 15:34:59 +0200
Subject: Change bandwidth graph to display advertised bandwidth.
Commit: 74d72cca10c4b8b1b21954c6312ab7e114c82fec

---
 rserve/linegraphs.R |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rserve/linegraphs.R b/rserve/linegraphs.R
index df5d978..b863d87 100644
--- a/rserve/linegraphs.R
+++ b/rserve/linegraphs.R
@@ -74,7 +74,7 @@ plot_bandwidth_line <- function(start, end, path) {
   con <- dbConnect(drv, user=dbuser, password=dbpassword, dbname=db)
   # TODO As soon as the database schema has bwadvertised, switch to that
   # and update the graph title!
-  q <- paste("SELECT bwobserved, date FROM total_bandwidth ",
+  q <- paste("SELECT bwadvertised, date FROM total_bandwidth ",
       "WHERE date >= '", start, "' AND date <= '", end, "'", sep = "")
   rs <- dbSendQuery(con, q)
   bandwidth <- fetch(rs,n=-1)
@@ -85,7 +85,7 @@ plot_bandwidth_line <- function(start, end, path) {
         "https://metrics.torproject.org/", sep = "")) +
     scale_y_continuous(name="Bandwidth (MiB/s)",
         limits = c(0, max(bandwidth$value, na.rm = TRUE) / 2^20)) +
-    opts(title = "Total observed bandwidth\n")
+    opts(title = "Total advertised bandwidth\n")
   ggsave(filename = path, width = 8, height = 5, dpi = 72)
   dbDisconnect(con)
   dbUnloadDriver(drv)
-- 
1.7.1



More information about the tor-commits mailing list