{"id":41594213,"url":"https://github.com/hertz-contrib/pprof","last_synced_at":"2026-01-24T09:36:47.716Z","repository":{"id":59814424,"uuid":"538275593","full_name":"hertz-contrib/pprof","owner":"hertz-contrib","description":"pprof for hertz","archived":false,"fork":false,"pushed_at":"2024-02-17T15:26:51.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-06-18T21:46:51.697Z","etag":null,"topics":["hertz","pprof"],"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/hertz-contrib.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-19T00:09:40.000Z","updated_at":"2023-03-12T08:36:39.000Z","dependencies_parsed_at":"2024-02-17T16:36:09.398Z","dependency_job_id":null,"html_url":"https://github.com/hertz-contrib/pprof","commit_stats":{"total_commits":10,"total_committers":7,"mean_commits":"1.4285714285714286","dds":0.8,"last_synced_commit":"132324b6586cefdaafbed07416e93a422294a2de"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":"cloudwego/.github","purl":"pkg:github/hertz-contrib/pprof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hertz-contrib%2Fpprof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hertz-contrib%2Fpprof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hertz-contrib%2Fpprof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hertz-contrib%2Fpprof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hertz-contrib","download_url":"https://codeload.github.com/hertz-contrib/pprof/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hertz-contrib%2Fpprof/sbom","scorecard":{"id":462444,"data":{"date":"2025-08-11","repo":{"name":"github.com/hertz-contrib/pprof","commit":"132324b6586cefdaafbed07416e93a422294a2de"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":7,"reason":"Found 7/10 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":0,"reason":"dangerous workflow patterns detected","details":["Warn: script injection with untrusted input ' github.head_ref ': .github/workflows/release-check.yml:15","Warn: script injection with untrusted input ' github.head_ref ': .github/workflows/release-check.yml:15"],"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-check.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/hertz-contrib/pprof/pr-check.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-check.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/hertz-contrib/pprof/pr-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-check.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/hertz-contrib/pprof/pr-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-check.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/hertz-contrib/pprof/pr-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-check.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/hertz-contrib/pprof/pr-check.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-check.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/hertz-contrib/pprof/pr-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-check.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/hertz-contrib/pprof/release-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/hertz-contrib/pprof/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/hertz-contrib/pprof/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/hertz-contrib/pprof/tests.yml/main?enable=pin","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   3 third-party GitHubAction dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pr-check.yml:1","Warn: no topLevel permission defined: .github/workflows/release-check.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T11:30:12.447Z","repository_id":59814424,"created_at":"2025-08-19T11:30:12.447Z","updated_at":"2025-08-19T11:30:12.447Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28723506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hertz","pprof"],"created_at":"2026-01-24T09:36:47.640Z","updated_at":"2026-01-24T09:36:47.696Z","avatar_url":"https://github.com/hertz-contrib.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pprof (This is a community driven project)\n\nEnglish | [中文](README_CN.md)\n\npprof middleware for Hertz framework, inspired by [pprof](https://github.com/gin-contrib/pprof).\nThis project would not have been possible without the support from the CloudWeGo community and previous work done by the gin community.\n\n- Package pprof serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool.\n\nfgprof inspired by [fgprof](https://github.com/felixge/fgprof).\n\nIf fgprof is used,please upgrade to Go 1.19 or newer. In older versions of Go fgprof can cause significant STW latencies in applications with a lot of goroutines (\u003e 1-10k). See [CL 387415](https://go-review.googlesource.com/c/go/+/387415) for more details.\n\n\n## Install\n```shell\ngo get github.com/hertz-contrib/pprof\n```\n\n## Usage\n### pprof Example \n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/cloudwego/hertz/pkg/app\"\n\t\"github.com/cloudwego/hertz/pkg/app/server\"\n\t\"github.com/cloudwego/hertz/pkg/common/utils\"\n\t\"github.com/cloudwego/hertz/pkg/protocol/consts\"\n\t\"github.com/hertz-contrib/pprof\"\n)\n\nfunc main() {\n\th := server.Default()\n\n\tpprof.Register(h)\n\n\th.GET(\"/ping\", func(c context.Context, ctx *app.RequestContext) {\n\t\tctx.JSON(consts.StatusOK, utils.H{\"ping\": \"pong\"})\n\t})\n\n\th.Spin()\n}\n```\n\n### change default path prefix\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/cloudwego/hertz/pkg/app\"\n\t\"github.com/cloudwego/hertz/pkg/app/server\"\n\t\"github.com/cloudwego/hertz/pkg/common/utils\"\n\t\"github.com/cloudwego/hertz/pkg/protocol/consts\"\n\t\"github.com/hertz-contrib/pprof\"\n)\n\nfunc main() {\n\th := server.Default()\n\n\t// default is \"debug/pprof\"\n\tpprof.Register(h, \"dev/pprof\")\n\n\th.GET(\"/ping\", func(c context.Context, ctx *app.RequestContext) {\n\t\tctx.JSON(consts.StatusOK, utils.H{\"ping\": \"pong\"})\n\t})\n\n\th.Spin()\n}\n```\n\n### custom router group\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/cloudwego/hertz/pkg/app\"\n\t\"github.com/cloudwego/hertz/pkg/app/server\"\n\t\"github.com/cloudwego/hertz/pkg/common/utils\"\n\t\"github.com/cloudwego/hertz/pkg/protocol/consts\"\n\t\"github.com/hertz-contrib/pprof\"\n)\n\nfunc main() {\n\th := server.Default()\n\n\tpprof.Register(h)\n\n\tadminGroup := h.Group(\"/admin\")\n\n\tadminGroup.GET(\"/ping\", func(c context.Context, ctx *app.RequestContext) {\n\t\tctx.JSON(consts.StatusOK, utils.H{\"ping\": \"pong\"})\n\t})\n\n\tpprof.RouteRegister(adminGroup, \"pprof\")\n\n\th.Spin()\n}\n```\n###  fgprof example\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/cloudwego/hertz/pkg/app\"\n\t\"github.com/cloudwego/hertz/pkg/app/server\"\n\t\"github.com/cloudwego/hertz/pkg/common/utils\"\n\t\"github.com/cloudwego/hertz/pkg/protocol/consts\"\n\t\"github.com/hertz-contrib/pprof\"\n)\n\n\th := server.Default()\n\n\tpprof.FgprofRegister(h)\n\n\th.GET(\"/ping\", func(c context.Context, ctx *app.RequestContext) {\n\t\tctx.JSON(consts.StatusOK, utils.H{\"ping\": \"pong\"})\n\t})\n\n\th.Spin()\n```\n\n### change default path prefix\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/cloudwego/hertz/pkg/app\"\n\t\"github.com/cloudwego/hertz/pkg/app/server\"\n\t\"github.com/cloudwego/hertz/pkg/common/utils\"\n\t\"github.com/cloudwego/hertz/pkg/protocol/consts\"\n\t\"github.com/hertz-contrib/pprof\"\n)\n\nfunc main() {\n\th := server.Default()\n\n\t// default is \"debug/pprof\"\n\tpprof.FgprofRegister(h, \"dev/fgprof\")\n\n\th.GET(\"/ping\", func(c context.Context, ctx *app.RequestContext) {\n\t\tctx.JSON(consts.StatusOK, utils.H{\"ping\": \"pong\"})\n\t})\n\n\th.Spin()\n}\n\n```\n\n### custom router group\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/cloudwego/hertz/pkg/app\"\n\t\"github.com/cloudwego/hertz/pkg/app/server\"\n\t\"github.com/cloudwego/hertz/pkg/common/utils\"\n\t\"github.com/cloudwego/hertz/pkg/protocol/consts\"\n\t\"github.com/hertz-contrib/pprof\"\n)\n\nfunc main() {\n\th := server.Default()\n\n\tpprof.FgprofRegister(h)\n\n\tadminGroup := h.Group(\"/admin\")\n\n\tadminGroup.GET(\"/ping\", func(c context.Context, ctx *app.RequestContext) {\n\t\tctx.JSON(consts.StatusOK, utils.H{\"ping\": \"pong\"})\n\t})\n\n\tpprof.FgprofRouteRegister(adminGroup, \"fgprof\")\n\n\th.Spin()\n}\n```\n---\n\n### Use the pprof tool\n\nThen use the pprof tool to look at the heap profile:\n\n```bash\ngo tool pprof http://localhost:8888/debug/pprof/heap\n```\n\nOr to look at a 30-second CPU profile:\n\n```bash\ngo tool pprof http://localhost:8888/debug/pprof/profile\n```\n\nOr to look at the goroutine blocking profile, after calling runtime.SetBlockProfileRate in your program:\n\n```bash\ngo tool pprof http://localhost:8888/debug/pprof/block\n```\n\nOr to collect a 5-second execution trace:\n\n```bash\nwget http://localhost:8888/debug/pprof/trace?seconds=5\n```\n\n### Use the fgprof tool\n\nTaking and analyzing a 3s profile：\n\n```\ngo tool pprof --http=:6061 http://localhost:6060/debug/fgprof?seconds=3\n```\n\n\n## License\nThis project is under the Apache License 2.0. See the LICENSE file for the full license text.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhertz-contrib%2Fpprof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhertz-contrib%2Fpprof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhertz-contrib%2Fpprof/lists"}