feat(instrumentation): added meter, histogram and new timer, timer now send p25, p75, p90, p99 percentiles in 1000 sample exp decaying sample
This commit is contained in:
@@ -39,12 +39,12 @@ func Logger() macaron.Handler {
|
||||
rw := res.(macaron.ResponseWriter)
|
||||
c.Next()
|
||||
|
||||
timeTakenMs := int64(time.Since(start) / time.Millisecond)
|
||||
timeTakenMs := time.Since(start) / time.Millisecond
|
||||
content := fmt.Sprintf("Completed %s %s \"%s %s %s\" %v %s %d bytes in %dms", c.RemoteAddr(), uname, req.Method, req.URL.Path, req.Proto, rw.Status(), http.StatusText(rw.Status()), rw.Size(), timeTakenMs)
|
||||
|
||||
if timer, ok := c.Data["perfmon.timer"]; ok {
|
||||
timerTyped := timer.(metrics.Timer)
|
||||
timerTyped.AddTiming(timeTakenMs)
|
||||
timerTyped.Update(timeTakenMs)
|
||||
}
|
||||
|
||||
switch rw.Status() {
|
||||
|
||||
Reference in New Issue
Block a user