
Perf
io.github.rog0x由 GitHub 账号 rog0x 发布v1.0.2更新于 Oct 24, 2026
Benchmark, memory, Big O analysis for AI agents
概览
本地 MCP 服务器,为助手提供性能分析工具:JavaScript 基准测试、Node.js 内存分析、Big O 估算、打包文件检查与 HTTP 压测。
- 可以做什么
- 对 JavaScript 代码片段进行多轮基准测试,输出延迟分位数和每秒操作数,并可并排比较两种实现。分析 Node.js 内存使用,按时间取快照并用趋势检测潜在内存泄漏。根据计时数据估算 Big O 复杂度并绘制增长曲线。检查 JavaScript 打包文件的原始大小、模块数量和 tree-shaking 机会。执行简单的 HTTP 压测并报告分位数、错误率和吞吐量。
- 适用场景
- 适合在调优 JavaScript 或 Node.js 代码时使用:让助手测量执行速度、比较不同实现、观察内存行为、估算算法复杂度或检查打包体积。也可用于对某个接口做快速 HTTP 压测。
- 运行要求
- 以本地进程通过 stdio 运行;需安装该 npm 包并构建,然后在桌面客户端中用 Node.js 指向构建后的入口文件。未声明账号、API 密钥或环境变量。仅 HTTP 压测工具需要网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 Perf,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-perf-tools
Performance analysis tools for AI agents, exposed via the Model Context Protocol (MCP).
Tools
benchmark
Benchmark JavaScript code execution. Run a snippet N times and measure min/max/avg/median/p95/p99 latency and operations per second. Optionally compare two implementations side by side.
Parameters:
code(string) — JavaScript code to benchmarkiterations(number, default 1000) — Number of iterationscompareCode(string, optional) — Second implementation to comparelabelA/labelB(string) — Labels for comparison output
memory_analyze
Analyze Node.js memory usage: heap used/total, RSS, external memory, and array buffers. Takes snapshots over time and uses linear regression to detect trends and potential memory leaks.
Parameters:
action—"snapshot"|"analyze"|"clear"
big_o_estimate
Estimate Big O complexity from empirical timing data. Fits measurements against O(1), O(log n), O(n), O(n log n), O(n^2), O(n^3), and O(2^n) using R-squared scoring. Includes an ASCII growth curve visualization.
Parameters:
inputSizes(number[]) — Array of input sizesexecutionTimesMs(number[]) — Corresponding execution times in ms
bundle_analyze
Analyze a JavaScript bundle file: raw size, gzip compressed estimate, detected module count, largest modules, and tree-shaking opportunities (side effects, duplicates).
Parameters:
filePath(string) — Absolute path to the bundle file
load_test
Simple HTTP load tester. Sends N requests at a given concurrency level and reports response time percentiles, error rate, throughput (req/sec), and status code distribution.
Parameters:
url(string) — Target URLtotalRequests(number, default 100) — Total requests to sendconcurrency(number, default 10) — Concurrent request countmethod(string, default "GET") — HTTP methodheaders(object, optional) — HTTP headersbody(string, optional) — Request bodytimeoutMs(number, default 30000) — Request timeout
Setup
Usage with Claude Desktop
Add to your claude_desktop_config.json:
License
MIT
来源:README.md,提交 903655a
工具
0版本历史
1- v1.0.2最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。