fix
This commit is contained in:
21
jiacrontab_admin/debug.go
Normal file
21
jiacrontab_admin/debug.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"jiacrontab/pkg/base"
|
||||
"net/http/pprof"
|
||||
)
|
||||
|
||||
func stat(ctx *myctx) {
|
||||
data := base.Stat.Collect()
|
||||
ctx.JSON(data)
|
||||
}
|
||||
|
||||
func pprofHandler(ctx *myctx) {
|
||||
if h := pprof.Handler(ctx.Params().Get("key")); h != nil {
|
||||
h.ServeHTTP(ctx.ResponseWriter(), ctx.Request())
|
||||
}
|
||||
}
|
||||
|
||||
func indexDebug(ctx *myctx) {
|
||||
pprof.Index(ctx.ResponseWriter(), ctx.Request())
|
||||
}
|
||||
Reference in New Issue
Block a user