{"id":23092085,"url":"https://github.com/bevzzz/provider-pprof","last_synced_at":"2026-01-30T08:02:04.165Z","repository":{"id":267802657,"uuid":"902406720","full_name":"bevzzz/provider-pprof","owner":"bevzzz","description":"OpenCtx provider that annotates Go functions with their associated CPU time and memory allocations.","archived":false,"fork":false,"pushed_at":"2024-12-12T15:08:43.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T13:41:37.533Z","etag":null,"topics":["openctx","pprof","profiling","sourcegraph-cody"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bevzzz.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,"zenodo":null}},"created_at":"2024-12-12T14:03:22.000Z","updated_at":"2024-12-12T15:08:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"42ddc2ca-117d-4ea8-9a7d-9b28b6b44b4c","html_url":"https://github.com/bevzzz/provider-pprof","commit_stats":null,"previous_names":["bevzzz/provider-pprof"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bevzzz/provider-pprof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bevzzz%2Fprovider-pprof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bevzzz%2Fprovider-pprof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bevzzz%2Fprovider-pprof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bevzzz%2Fprovider-pprof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bevzzz","download_url":"https://codeload.github.com/bevzzz/provider-pprof/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bevzzz%2Fprovider-pprof/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28908822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T06:42:00.998Z","status":"ssl_error","status_checked_at":"2026-01-30T06:41:58.659Z","response_time":66,"last_error":"SSL_read: 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":["openctx","pprof","profiling","sourcegraph-cody"],"created_at":"2024-12-16T21:27:25.661Z","updated_at":"2026-01-30T08:02:04.160Z","avatar_url":"https://github.com/bevzzz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [pprof](https://github.com/google/pprof) context provider for OpenCtx\n\n[OpenCtx](https://openctx.org) provider that annotates Go functions with their associated CPU time and memory allocations based on the CPU/memory profiles.\n\nAs profiling reports are usually not stored in a centralized remote location (like, e.g. docs or logs) and only exist on your machine, this provider only supports local VSCode client. It also does not provide annotations for test files.\n\nWhen enabled, pprof provider will:\n\n1. Search the workspace to find a profiling report and, optionally, a Go binary that produced it.\n1. Get `pprof -top` nodes for the current package.\n1. Create an annotation for each function/method in the current file denoting its resourse consumption.\n1. Pass a detailed `pprof -list` breakdown to `annotation.item.ai` to be consumed by Cody.\n\n## Usage\n\nAdd the following to your `settings.json`:\n\n```json\n\"openctx.providers\": {\n    // ...other providers...\n    \"https://npmjs.com/package/@bevzzz/provider-pprof\": true\n},\n```\n\nPprof provider has reasonable defaults, so no additional configuration in necessary if you follow the standard naming conventions for pprof reports and Go binaries, e.g. that a cpu profile report has `.pprof` extension.\n\nMost of the time, however, you'll want to adjust the config to suit your preferences.\n\n## Configuration\n\nThe default configuration looks like this:\n\n```json\n{\n    \"reportGlob\": \"**/*.pprof\",\n    \"binaryGlob\": undefined, // By default, looks for a binary whose name matches the name of its parent directory\n    \"rootDirectoryMarkers\": [\"go.mod\", \".git\"],\n    \"top\": { // Options to control `pprof -top` output\n        \"excludeInline\": true, // Add `-noinlines`\n        \"nodeCount\": undefined, // Add `-nodecount=x`, not set by default\n        \"sort\": \"cum\" // Set `-cum` or `-flat`\n    }\n}\n```\n\n## Limitations\n\n`pprof` can collect stack traces for a number of [different profiles](https://pkg.go.dev/runtime/pprof#Profile):\n\n```\ngoroutine    - stack traces of all current goroutines\nheap         - a sampling of memory allocations of live objects\nallocs       - a sampling of all past memory allocations\nthreadcreate - stack traces that led to the creation of new OS threads\nblock        - stack traces that led to blocking on synchronization primitives\nmutex        - stack traces of holders of contended mutexes\n```\n\nThis provider only supports `heap` and CPU profile[^1].\n\n____\n\n[^1]: The CPU profile is not available as `runtime/pprof.Profile` and has a special API.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbevzzz%2Fprovider-pprof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbevzzz%2Fprovider-pprof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbevzzz%2Fprovider-pprof/lists"}