Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2020-06-05 11:31:18 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-06-05 11:31:18 +0300
commite96f9d00469050d3548ee45928b2a5b6733a3a7d (patch)
tree25dd18901d9e23e08c275ee6c896c06ae63dfe14 /app.go
parentc877296b468e4a828da27f4fd47c3e17eb7e2e1d (diff)
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.
Diffstat (limited to 'app.go')
-rw-r--r--app.go2
1 files changed, 1 insertions, 1 deletions
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)