diff --git a/Gopkg.lock b/Gopkg.lock index 473993b..b260b65 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -44,6 +44,14 @@ revision = "cf4846e6a636a76237a28d9286f163c132e841bc" version = "v1.2" +[[projects]] + digest = "1:fd66f3d5f4398879b0051e46e8421abdc93b5a6a64b645dc80986157fb99308d" + name = "github.com/gin-contrib/pprof" + packages = ["."] + pruneopts = "UT" + revision = "cea200e02ddddca4b843d75d32aa13c413549de9" + version = "v1.1" + [[projects]] branch = "master" digest = "1:36fe9527deed01d2a317617e59304eb2c4ce9f8a24115bcc5c2e37b3aee5bae4" @@ -251,6 +259,7 @@ input-imports = [ "github.com/PuerkitoBio/goquery", "github.com/gin-contrib/cors", + "github.com/gin-contrib/pprof", "github.com/gin-gonic/contrib/sessions", "github.com/gin-gonic/gin", "github.com/gin-gonic/gin/binding", diff --git a/router/routes/routes.go b/router/routes/routes.go index 9980007..d2b6d01 100644 --- a/router/routes/routes.go +++ b/router/routes/routes.go @@ -13,6 +13,7 @@ import ( "git.trj.tw/golang/mtfosbot/router/rimg" "git.trj.tw/golang/mtfosbot/router/twitch" "github.com/gin-contrib/cors" + "github.com/gin-contrib/pprof" "github.com/gin-gonic/contrib/sessions" "github.com/gin-gonic/gin" ) @@ -102,4 +103,7 @@ func SetRoutes(r *gin.Engine) { twitchApis.GET("/login", context.PatchCtx(twitch.OAuthLogin)) twitchApis.GET("/oauth", context.PatchCtx(twitch.OAuthProc)) } + + // set pprof router + pprof.Register(r) }