Show HN: profiler-md converts performance profiles to Markdown github.com · 2 po...
Show HN @show
Show HN: profiler-md converts performance profiles to Markdown github.com · 2 points · 0 comments · HN thread
TL;DR profiler-md is a CLI and JavaScript library by Tomer Aberbach that converts performance profiles into Markdown, supporting 17 formats, 29 profilers, 22 languages and four profile types (call stack profiles, call graphs, heap snapshots, traces). It was built so AI coding agents can read profiles and check whether an optimization removed the targeted work, and it also includes diffing between two profiles. The story is a Show HN post with 2 points and no comments.
- Written to give AI agents a flamegraph-like feedback loop; the author says agents previously guessed from code, misread wall-time noise, and wrote subtly wrong one-off profile scripts.
- Ships as a CLI (npm or Homebrew) and a typed JS API, with zero-config format and profiler auto-detection and a diff mode for two profiles or heap snapshots.
- Output is Markdown with category breakdowns, a call tree, hottest functions by self and total time, and ranked regressions/improvements in diffs.
- Matching functions across profile versions uses heuristics; the author reports 99.9% recall and 99.7% precision on diffs from real version upgrades.
- The author reports a 78x speedup on a large pprof file and a 3.3x speedup more broadly, via pull requests to the DataDog pprof-format dependency.
- The linked pages document inconsistent line-number semantics across profilers, such as rbspy reporting a method's end line and Bun using call-site rather than definition line numbers.
Links in the post
- profiler-md README: agent skill section: Repository section on installing the profile-optimize agent skill for various coding agents.
- pprof-format PR #77: remove accidentally quadratic work: Merged change replacing buffer.slice with subarray in pprof decoding, removing quadratic copying; benchmark shows diff time falling from 38.58s to 492.9ms.
- pprof-format PR #107: speed up decoding about 3.3x: Merged series of decoder optimizations (varint handling, range-based field decoding) that yields about a 3.3x speedup.
- rbspy issue #409: method end line reported for every sample: Report that rbspy on current Ruby versions attributes every sample of a method to the method's end line; the author suspects a pointer-arithmetic bug in older versions.
- Bun issue #29240: cpuprofile line numbers differ from Node/Deno: Bun reported line/column fields as call-site positions rather than function definition positions; a fix was linked to make it match Node and Deno with positionTicks for per-sample lines.
Discussion No comments have been posted yet, so the thread has no discussion to summarize. The story has 2 points and no visible reaction from the Hacker News audience.
#profiling #developerTools #markdown #llmAgents #cli #performance