fix int max perf counter bug
This commit is contained in:
parent
ca8411a519
commit
08891853e6
|
@ -135,11 +135,13 @@ func renderTemplate3(tmplName, hookName string, w http.ResponseWriter, r *http.R
|
||||||
}
|
}
|
||||||
|
|
||||||
FootHeaders(w, h)
|
FootHeaders(w, h)
|
||||||
|
if h.Zone != "error" {
|
||||||
since := time.Since(h.StartedAt)
|
since := time.Since(h.StartedAt)
|
||||||
//if h.CurrentUser.IsAdmin {
|
//if h.CurrentUser.IsAdmin {
|
||||||
h.Elapsed1 = since.String()
|
h.Elapsed1 = since.String()
|
||||||
//}
|
//}
|
||||||
co.PerfCounter.Push(since)
|
co.PerfCounter.Push(since/*, false*/)
|
||||||
|
}
|
||||||
if c.RunPreRenderHook("pre_render_"+hookName, w, r, &h.CurrentUser, pi) {
|
if c.RunPreRenderHook("pre_render_"+hookName, w, r, &h.CurrentUser, pi) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -147,7 +149,6 @@ func renderTemplate3(tmplName, hookName string, w http.ResponseWriter, r *http.R
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
//co.PerfCounter.Push(since)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue