diff --git a/charts.go b/charts.go index bf6a0a1..dda4f82 100644 --- a/charts.go +++ b/charts.go @@ -40,6 +40,7 @@ func (a *App) renderChart(w http.ResponseWriter, c renderableChart) error { } func makeHistoryChart(title string, points []ServerPoint) chart.Chart { + // TODO BUG: one day is missing randomly (usually the 3rd day in the range) in the chart var xVals []time.Time var yVals []float64 for _, p := range points { diff --git a/handler_helpers.go b/handler_helpers.go index 4dac5f3..a6032f4 100644 --- a/handler_helpers.go +++ b/handler_helpers.go @@ -2,9 +2,7 @@ package ss13_se import ( "fmt" - "log" "net/http" - "time" "github.com/gorilla/mux" ) @@ -23,9 +21,9 @@ type handlerVars map[string]string type handler func(http.ResponseWriter, *http.Request, handlerVars) error func (h handler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { - start := time.Now() + //start := time.Now() err := h(rw, req, mux.Vars(req)) - dur := time.Since(start) + //dur := time.Since(start) if err != nil { switch e := err.(type) { @@ -37,13 +35,13 @@ func (h handler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { } } - log.Printf("%s %s \t%s \terr: %v\n", - //req.RemoteAddr, - req.Method, - req.URL.String(), - //req.UserAgent(), - dur, - //resp.Status, - err, - ) + //log.Printf("%s %s \t%s \terr: %v\n", + //req.RemoteAddr, + //req.Method, + //req.URL.String(), + //req.UserAgent(), + //dur, + //resp.Status, + //err, + //) }