mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-18 14:18:10 -07:00
rollout more stats
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user