
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 分
請在儲存庫或註冊中心條目中宣告授權條款。