junjiechen0/njust/cjprof
Claude Code and agent skill by junjiechen0/njust
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install junjiechen0/njust/cjprofSKILL.md
The same SKILL.md was published earlier as junjiechen0/njust/cjprof.
仓颉性能分析工具 cjprof Skill
1. 概述
cjprof(Cangjie Profile)是仓颉语言的性能分析工具,支持 CPU 热点函数采样分析和堆内存分析。仅支持 Linux 系统。
权限要求:cjprof record需要root/sudo权限,或系统perf_event_paranoid配置为-1。
2. CPU 热点函数分析
2.1 采样(record)
| 选项 | 说明 | |
|---|---|---|
-f / --freq <freq> | 采样频率(Hz),默认 5000,max 取系统最大值 | |
-o / --output <file> | 输出文件名(默认 cjprof.data) | |
-p / --pid <pid> | 指定进程 ID |
采样过程中按Ctrl+C可提前结束。
2.2 生成报告(report)
| 选项 | 说明 | |
|---|---|---|
-F / --flame-graph | 生成火焰图(SVG) | |
-i / --input <file> | 输入数据文件(默认 cjprof.data) | |
-o / --output <file> | 火焰图输出文件(默认 FlameGraph.svg) |
报告说明:
- 文本报告:显示函数采样总占比(含子函数)、自身占比、函数名,按总占比降序
- 火焰图:横轴=采样占比(越宽越耗时),纵轴=调用栈(父下子上)
3. 堆内存分析
3.1 导出堆内存(dump)
导出会向进程发送SIG_USR1信号,需确认目标为仓颉程序。
3.2 分析对象信息
输出各对象类型的实例数、浅堆大小、深堆大小:
3.3 查看仓颉线程栈
3.4 查看对象引用关系
3.5 堆分析选项
| 选项 | 说明 | |
|---|---|---|
-d / --dump <pid> | 导出指定进程的堆内存 | |
-i / --input <file> | 分析的堆数据文件(默认 cjprof.data) | |
-o / --output <file> | 导出的堆数据文件(默认 cjprof.data) | |
--show-reference[=<names>] | 展示对象引用关系(; 分隔多个对象名) | |
--incoming-reference | 展示被引用关系(需配合 --show-reference) | |
-D / --depth <n> | 引用关系最大展示深度(默认 10) | |
-t / --show-thread | 展示仓颉线程栈及栈中引用的对象 | |
-V / --verbose | 打印解析日志 |
4. 术语说明
- 浅堆(Shallow Heap):对象自身占用的堆内存大小
- 深堆(Retained Heap):对象被 GC 回收后可释放的所有关联对象的浅堆大小之和
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.njust-ai/skills/cangjie-toolchains/cjprof/SKILL.md
Popularity
- Repository stars
- 4
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/junjiechen0/njust/cjprof)