From e96f9d00469050d3548ee45928b2a5b6733a3a7d Mon Sep 17 00:00:00 2001 From: Jaime Martinez Date: Fri, 5 Jun 2020 18:31:18 +1000 Subject: Use histograms instead of gagues Removed test assertion for metric as histograms are not collectors so we can't really test it. Left the test though as it's still valuable. --- app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app.go') diff --git a/app.go b/app.go index 38744e93..7b1749a6 100644 --- a/app.go +++ b/app.go @@ -259,7 +259,7 @@ func (a *theApp) accessControlMiddleware(handler http.Handler) http.Handler { func (a *theApp) serveFileOrNotFoundHandler() http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { start := time.Now() - defer metrics.ServingTime.Set(time.Since(start).Seconds()) + defer metrics.ServingTime.Observe(time.Since(start).Seconds()) domain := request.GetDomain(r) fileServed := domain.ServeFileHTTP(w, r) -- cgit v1.2.3