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

profiler-md

v0.1.3

Published

Converts performance profiles to human and LLM friendly Markdown.

Readme

[!NOTE]

This package is in a beta state and I'm excited for you to try it out!

I'd love your feedback! Share any suggestions, bug reports, feature requests, or general thoughts by filing an issue.

Features

  • Multi-format: supports pprof, Speedscope, V8 CPU profiles, V8 heap profiles, and V8 heap snapshots
  • Multi-language: JS/TS via V8 formats (Node.js, Bun, Deno); Go, Python, Rust, Java, and more via pprof and Speedscope
  • Configurable: control the number of top entries shown, working directory for relative paths, third-party detection, and entry filtering
  • CLI and API: usable on the command-line or programmatically

Install

$ npm i profiler-md

Usage

CLI

$ profiler-md --help

  Converts performance profiles to human and LLM friendly Markdown.

  Usage: profiler-md [options] [file]

  Options:
    -t, --type <type>     Profile type, auto-detected from content if omitted
                          [pprof|speedscope|v8-cpu-profile|v8-heap-profile|v8-heap-snapshot]
    -o, --output <file>   Output file (default: - for stdout)
    --top-n <n>           Number of top entries to show (default: 20)
    --cwd <path>          Working directory for relative file paths in output
    --third-party <glob>  Mark URLs matching this glob as third-party
                          (repeatable; default: node_modules)
    --source-maps <glob>  Apply source maps matching this glob to profile
                          locations; files may be source map JSON or contain
                          inline source map comments (repeatable)
    --help                Show this help message

API

import { readFile } from 'node:fs/promises'
import {
  defaultIncludeEntry,
  defaultIsThirdPartyEntry,
  pprofToMd,
  speedscopeProfileToMd,
  v8CpuProfileToMd,
  v8HeapProfileToMd,
  v8HeapSnapshotToMd,
} from 'profiler-md'

const pprofData = await readFile(`example.pprof`)
const speedscopeProfileData = await readFile(`example.speedscope.json`)
const v8CpuProfileData = await readFile(`example.cpuprofile`)
const v8HeapProfileData = await readFile(`example.heapprofile`)
const v8HeapSnapshotData = await readFile(`example.heapsnapshot`)

// Basic usage
console.log(pprofToMd(pprofData))
console.log(speedscopeProfileToMd(speedscopeProfileData))
console.log(v8CpuProfileToMd(v8CpuProfileData))
console.log(v8HeapProfileToMd(v8HeapProfileData))
console.log(v8HeapSnapshotToMd(v8HeapSnapshotData))

// Complex usage
const options = {
  // Show top 10 functions instead of the default 20.
  topN: 10,
  // Make paths relative to a custom directory.
  cwd: `/path/to/project`,
  isThirdPartyEntry: entry =>
    defaultIsThirdPartyEntry(entry) ||
    // Treat an additional vendor directory as third-party.
    !!entry.location?.url.pathname.includes(`/vendor/`),
  includeEntry: entry =>
    defaultIncludeEntry(entry) &&
    // Exclude entries from a specific file.
    !entry.location?.includes(`/path/to/project/src/noisy`),
}
console.log(pprofToMd(pprofData, options))
console.log(speedscopeProfileToMd(speedscopeProfileData, options))
console.log(v8CpuProfileToMd(v8CpuProfileData, options))
console.log(v8HeapProfileToMd(v8HeapProfileData, options))
console.log(v8HeapSnapshotToMd(v8HeapSnapshotData, options))

Skills

Use this profiler-md skill to have an agent profile and optimize your code:

$ npx skills add TomerAberbach/profiler-md --skill profile-optimize

See skills.sh for more info.

Fun fact: the skill has been used to profile and optimize profiler-md using itself!

Contributing

Stars are always welcome!

For bugs and feature requests, please create an issue.

License

MIT © Tomer Aberbach