rollout more stats

This commit is contained in:
Jimmy Zelinskie
2014-07-21 20:24:51 -04:00
parent 24f3e6b80b
commit 2c8894fbda
4 changed files with 43 additions and 8 deletions
+5
View File
@@ -12,6 +12,7 @@ import (
"github.com/julienschmidt/httprouter"
"github.com/chihaya/chihaya/stats"
"github.com/chihaya/chihaya/tracker"
"github.com/chihaya/chihaya/tracker/models"
)
@@ -42,6 +43,8 @@ func (s *Server) serveAnnounce(w http.ResponseWriter, r *http.Request, p httprou
return http.StatusInternalServerError, err
}
stats.RecordEvent(stats.Announce)
return http.StatusOK, nil
}
@@ -60,6 +63,8 @@ func (s *Server) serveScrape(w http.ResponseWriter, r *http.Request, p httproute
return http.StatusInternalServerError, err
}
stats.RecordEvent(stats.Scrape)
return http.StatusOK, nil
}