From 08891853e65387ca5f415e429dcbb0e3fb03b5f2 Mon Sep 17 00:00:00 2001 From: Azareal Date: Fri, 28 Feb 2020 15:06:16 +1000 Subject: [PATCH] fix int max perf counter bug --- routes/common.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routes/common.go b/routes/common.go index 44d64787..bfd6030e 100644 --- a/routes/common.go +++ b/routes/common.go @@ -135,11 +135,13 @@ func renderTemplate3(tmplName, hookName string, w http.ResponseWriter, r *http.R } FootHeaders(w, h) + if h.Zone != "error" { since := time.Since(h.StartedAt) //if h.CurrentUser.IsAdmin { h.Elapsed1 = since.String() //} - co.PerfCounter.Push(since) + co.PerfCounter.Push(since/*, false*/) + } if c.RunPreRenderHook("pre_render_"+hookName, w, r, &h.CurrentUser, pi) { return nil } @@ -147,7 +149,6 @@ func renderTemplate3(tmplName, hookName string, w http.ResponseWriter, r *http.R if err != nil { return err } - //co.PerfCounter.Push(since) return nil }