internal/frontend: add /search-stats endpoint
A /search-stats endpoint is added so that stats for the search handler
can be viewed.
For golang/go#44142
Trust: Julie Qiu
Run-TryBot: Julie Qiu
TryBot-Result: kokoro
@@ -151,6 +151,8 @@ func (s *Server) Install(handle func(string, http.Handler), redisClient *redis.C
if s.serveStats {
handle("/detail-stats/",
middleware.Stats()(http.StripPrefix("/detail-stats", s.errorHandler(s.serveDetails))))
+ handle("/search-stats/",
+ middleware.Stats()(http.StripPrefix("/search-stats", s.errorHandler(s.serveSearch))))
}
handle("/robots.txt", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
