From aae455cee49fdfb3d61d1388f7d286ae83dd6ee1 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 10 十一月 2023 14:20:49 +0800
Subject: [PATCH] 引入pprof分析性能

---
 router/index.go |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/router/index.go b/router/index.go
index df7e1dd..2009cc6 100644
--- a/router/index.go
+++ b/router/index.go
@@ -5,6 +5,7 @@
 	"apsClient/conf"
 	_ "apsClient/docs"
 	"github.com/gin-contrib/cors"
+	"github.com/gin-contrib/pprof"
 	"github.com/gin-gonic/gin"
 	swaggerFiles "github.com/swaggo/files"
 	ginSwagger "github.com/swaggo/gin-swagger"
@@ -15,6 +16,9 @@
 	gin.SetMode(gin.ReleaseMode)
 
 	Router := gin.Default()
+
+	pprof.Register(Router) // 鎬ц兘
+
 	Router.Use(gin.Recovery())
 	if conf.Conf.System.Env == "develop" {
 		Router.Use(gin.Logger())

--
Gitblit v1.8.0