npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bevzzz/provider-pprof

v1.0.0

Published

OpenCtx provider that annotates Go functions with their associated CPU time and memory allocations.

Downloads

4

Readme

pprof context provider for OpenCtx

OpenCtx provider that annotates Go functions with their associated CPU time and memory allocations based on the CPU/memory profiles.

As 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.

When enabled, pprof provider will:

  1. Search the workspace to find a profiling report and, optionally, a Go binary that produced it.
  2. Get pprof -top nodes for the current package.
  3. Create an annotation for each function/method in the current file denoting its resourse consumption.
  4. Pass a detailed pprof -list breakdown to annotation.item.ai to be consumed by Cody.

Usage

Add the following to your settings.json:

"openctx.providers": {
    // ...other providers...
    "https://npmjs.com/package/@bevzzz/provider-pprof": true
},

Pprof 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.

Most of the time, however, you'll want to adjust the config to suit your preferences.

Configuration

The default configuration looks like this:

{
    "reportGlob": "**/*.pprof",
    "binaryGlob": undefined, // By default, looks for a binary whose name matches the name of its parent directory
    "rootDirectoryMarkers": ["go.mod", ".git"],
    "top": { // Options to control `pprof -top` output
        "excludeInline": true, // Add `-noinlines`
        "nodeCount": undefined, // Add `-nodecount=x`, not set by default
        "sort": "cum" // Set `-cum` or `-flat`
    }
}

Limitations

pprof can collect stack traces for a number of different profiles:

goroutine    - stack traces of all current goroutines
heap         - a sampling of memory allocations of live objects
allocs       - a sampling of all past memory allocations
threadcreate - stack traces that led to the creation of new OS threads
block        - stack traces that led to blocking on synchronization primitives
mutex        - stack traces of holders of contended mutexes

This provider only supports heap and CPU profile[^1].

Development


[^1]: The CPU profile is not available as runtime/pprof.Profile and has a special API.