{"id":19197702,"url":"https://github.com/eddycjy/edge-pprof","last_synced_at":"2025-06-30T11:03:14.974Z","repository":{"id":57523813,"uuid":"168695382","full_name":"eddycjy/edge-pprof","owner":"eddycjy","description":"An edge application for aggregate performance analysis (PProf) of Go services in an internal environment.","archived":false,"fork":false,"pushed_at":"2019-06-04T08:36:41.000Z","size":1594,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-30T11:03:02.337Z","etag":null,"topics":["docker","go","k8s","pprof","services"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eddycjy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-01T12:38:13.000Z","updated_at":"2022-08-23T07:08:39.000Z","dependencies_parsed_at":"2022-09-26T18:10:37.252Z","dependency_job_id":null,"html_url":"https://github.com/eddycjy/edge-pprof","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eddycjy/edge-pprof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Fedge-pprof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Fedge-pprof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Fedge-pprof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Fedge-pprof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddycjy","download_url":"https://codeload.github.com/eddycjy/edge-pprof/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Fedge-pprof/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262762436,"owners_count":23360326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","go","k8s","pprof","services"],"created_at":"2024-11-09T12:17:52.021Z","updated_at":"2025-06-30T11:03:14.915Z","avatar_url":"https://github.com/eddycjy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Edge PProf\n\n在内部环境，对 Go 服务进行聚合性能分析（PProf）的一个边缘应用\n\n![image](https://i.imgur.com/EBMfh6Q.png)\n\n## 环境要求\n\n- go \u003e= 1.10\n- [go-bindata](https://github.com/go-bindata/go-bindata)\n- graphviz\n\n## 配置\n\n若要修改默认配置，则到 `conf/app.ini` 文件进行修改。该配置文件通过 go-bindata 嵌入到二进制文件中\n\n## 安装\n\n```\n$ go get -u github.com/EDDYCJY/edge-pprof\n\n$ go-bindata -pkg=bindata -o pkg/bindata/bindata.go ./conf/app.ini\n\n$ go run main.go\n```\n\n### 运行信息\n\n```\n$ go run main.go\n[GIN-debug] [WARNING] Running in \"debug\" mode. Switch to \"release\" mode in production.\n - using env:\texport GIN_MODE=release\n - using code:\tgin.SetMode(gin.ReleaseMode)\n\n[GIN-debug] GET    /resource/*filepath       --\u003e github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (3 handlers)\n[GIN-debug] HEAD   /resource/*filepath       --\u003e github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (3 handlers)\n[GIN-debug] GET    /api/v1/debug/pprof/profile --\u003e github.com/EDDYCJY/edge-pprof/server.(*Profile).Handle-fm (3 handlers)\n[GIN-debug] GET    /api/v1/debug/pprof/heap  --\u003e github.com/EDDYCJY/edge-pprof/server.(*Heap).Handle-fm (3 handlers)\n[GIN-debug] GET    /api/v1/debug/pprof/block --\u003e github.com/EDDYCJY/edge-pprof/server.(*Block).Handle-fm (3 handlers)\n[GIN-debug] GET    /api/v1/debug/pprof/mutex --\u003e github.com/EDDYCJY/edge-pprof/server.(*Mutex).Handle-fm (3 handlers)\n[GIN-debug] Listening and serving HTTP on 0.0.0.0:8080\n```\n\n## 例子\n\n1. debug/pprof/profile：`$HOST/api/v1/debug/pprof/profile?service_name=$NAME\u0026service_port=$PORT`\n\n```\n{\n    \"code\": 1,\n    \"msg\": \"ok\",\n    \"data\": {\n        \"image_url\": \"$HOST/resource/profile/$NAME.1549087498.svg\",\n        \"pzpb_url\": \"$HOST/resource/profile/$NAME.1549087498.pb.gz\"\n    }\n}\n```\n### 返回格式 \n\n#### .pb.gz\n\n可供下载到本地后利用 `go tool pprof` 进行更详细的性能分析\n\n#### .svg\n\n![image](https://i.imgur.com/xwqqqGI.jpg)\n\n2. debug/pprof/heap：`$HOST/api/v1/debug/pprof/heap?service_name=$NAME\u0026service_port=$PORT`\n\n```\n{\n    \"code\": 1,\n    \"msg\": \"ok\",\n    \"data\": {\n        \"image_url\": \"$HOST/resource/heap/$NAME.1549087819.svg\",\n        \"pzpb_url\": \"$HOST/resource/heap/$NAME.1549087819.pb.gz\"\n    }\n}\n```\n\n3. debug/pprof/block: `$HOST/api/v1/debug/pprof/block?service_name=$NAME\u0026service_port=$PORT`\n\n4. debug/pprof/mutex: `$HOST/api/v1/debug/pprof/mutex?service_name=$NAME\u0026service_port=$PORT`\n\n## TODO\n\n- Logging\n- JWT\n- AliyunOss 支持\n- Makefile\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddycjy%2Fedge-pprof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddycjy%2Fedge-pprof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddycjy%2Fedge-pprof/lists"}