Agent Skillstimeplus-io/proton › alloc-profile

alloc-profile

GitHub

分析 jemalloc 或 async-profiler 的内存分配配置文件,定位分配热点与代码归属。

.claude/skills/alloc-profile/SKILL.md timeplus-io/proton

Trigger Scenarios

用户提到内存分析、堆分析、分配热点 涉及 jemalloc、async-profiler 或折叠栈格式文件

Install

npx skills add timeplus-io/proton --skill alloc-profile -g -y
More Options

Non-standard path

npx skills add https://github.com/timeplus-io/proton/tree/develop/.claude/skills/alloc-profile -g -y

Use without installing

npx skills use timeplus-io/proton@alloc-profile

指定 Agent (Claude Code)

npx skills add timeplus-io/proton --skill alloc-profile -a claude-code -g -y

安装 repo 全部 skill

npx skills add timeplus-io/proton --all -g -y

预览 repo 内 skill

npx skills add timeplus-io/proton --list

SKILL.md

Frontmatter
{
    "name": "alloc-profile",
    "description": "Analyze jemalloc or async-profiler allocation profiles in collapsed stack format. Make sure to use this skill whenever the user mentions memory profiling, heap analysis, allocation hotspots, jemalloc, async-profiler, collapsed stacks, .folded files, or asks about memory usage patterns."
}

Allocation Profile

Inputs

  • $0 (optional): path to a .collapsed or .folded profile

If no path is given, search near the current directory:

find . -maxdepth 4 \( -name "*.collapsed" -o -name "*.folded" \) | sort

Tooling

Use the bundled analyzer script:

python3 .claude/skills/alloc-profile/scripts/analyze_alloc_profile.py <profile>

What the analyzer reports

  • Total samples/bytes and unique stack traces
  • Top stack traces
  • Top outermost meaningful frames
  • Top leaf allocation frames

This gives both:

  • "why did we allocate?" via outermost frames
  • "what code actually allocated?" via leaf frames

Interpretation guidance

  • Large outermost buckets often point to the higher-level operation to optimize first.
  • Large leaf buckets inside allocators or containers are usually symptoms; look one or two frames above for product code.
  • For streaming paths, pay special attention to joins, windows, aggregation state, and block materialization.
  • For historical paths, focus on scans, merges, deserialization, and sort/aggregation buffers.

Related repo context

Output expectations

Summarize:

  1. biggest operations by memory share
  2. likely owning subsystem
  3. likely next inspection target in code
  4. whether the profile looks like steady-state memory, burst allocation, or leak-like retention

Version History

  • 7be2219 Current 2026-08-20 08:20

Same Skill Collection

.claude/skills/build-and-verify/SKILL.md
.claude/skills/ci-diagnostics/SKILL.md
.claude/skills/cpp-coding/SKILL.md
.claude/skills/create-worktree/SKILL.md
.claude/skills/review/SKILL.md
.claude/skills/sql-usage/SKILL.md

Metadata

Files
0
Version
7be2219
Hash
370b186f
Indexed
2026-08-20 08:20

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-28 00:49
浙ICP备14020137号-1 $Carte des visiteurs$