mirror of
https://github.com/astaxie/beego.git
synced 2025-07-04 09:40:19 +00:00
added pattern to FilterMonitorFunc
This commit is contained in:
@ -849,11 +849,15 @@ Admin:
|
||||
//admin module record QPS
|
||||
if BConfig.Listen.EnableAdmin {
|
||||
timeDur := time.Since(startTime)
|
||||
pattern := ""
|
||||
if routerInfo != nil {
|
||||
pattern = routerInfo.pattern
|
||||
}
|
||||
statusCode := context.ResponseWriter.Status
|
||||
if statusCode == 0 {
|
||||
statusCode = 200
|
||||
}
|
||||
if FilterMonitorFunc(r.Method, r.URL.Path, timeDur, statusCode) {
|
||||
if FilterMonitorFunc(r.Method, r.URL.Path, timeDur, pattern, statusCode) {
|
||||
if runRouter != nil {
|
||||
go toolbox.StatisticsMap.AddStatistics(r.Method, r.URL.Path, runRouter.Name(), timeDur)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user