CPU Usage Monitor 技能:比较重复计算的进程 CPU 时间
EnglishClaude Code 安装步骤
- 从 GitHub 固定提交获取完整的 `plugins/performance/cpu-usage-monitor/skills/monitoring-cpu-usage` 目录。
- 复制到目标项目的 `.claude/skills/`,确认 `.claude/skills/monitoring-cpu-usage/SKILL.md`,再从项目根目录启动 Claude Code,输入 `/monitoring-cpu-usage`。
中文摘要
用 Claude Code 找出本地数据处理中的重复计算,比较相同输入下的进程 CPU 时间、结果和主要开销。
SKILL.md 中文导读
可复现示例
在本地脚本里反复对相同 2,000 个商品标签构建查找表。保留一次预计算的版本,比较两版对同一查询列表的结果和 CPU 时间。工作步骤
- 为单次计算和重复计算设定相同工作范围,记录每次 CPU 时间和结果。
- 将循环内可复用计算提到外部,并重复多次测量以观察变化。
验收方法
两个版本查询结果一致。CPU 时间对比报告列出重复构建和复用两种实际测量。
GitHub 原文 · 更新日期
适用环境
准备自己的 Python 脚本、固定合成输入与 CPU 测量方法。示例通过 time.process_time 记录同一进程的 CPU 时间。
常见问题
CPU 时间和用户等待时间相同吗?
CPU 时间描述处理器运行时间。需要评估等待时,还要记录墙钟时间与可能的 I/O。
相关指南
相关推荐
groq-install-auth 技能
jeremylongshore/claude-code-plugins-plus-skills
anima-common-errors 技能
jeremylongshore/claude-code-plugins-plus-skills
apple-notes-hello-world 技能
jeremylongshore/claude-code-plugins-plus-skills
castai-hello-world 技能
jeremylongshore/claude-code-plugins-plus-skills
cohere-local-dev-loop 技能
jeremylongshore/claude-code-plugins-plus-skills
figma-security-basics 技能
jeremylongshore/claude-code-plugins-plus-skills