gateway-restart-profiler

OpenClaw Gateway 重启性能分析工具。分析 Gateway 重启速度、排查启动慢的原因、生成性能报告、诊断启动问题。支持 Windows (PowerShell) 和 Linux (Bash) 平台。触发场景包括:分析 gateway 重启、检查启动时间、gateway 太慢了、生成性能报告、诊断 gateway 启动问题、Gateway 启动优化、OpenClaw 性能分析。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "gateway-restart-profiler" with this command: npx skills add tstj007/gateway-restart-profiler

Gateway Restart Profiler

分析 OpenClaw Gateway 重启时的各阶段耗时,生成性能报告并给出优化建议。

支持平台

  • Windows: PowerShell 5.0+
  • Linux: Bash 4.0+, 需安装 bc 计算器

使用方法

Windows

powershell -ExecutionPolicy Bypass -File <skill>/scripts/gateway-profile.ps1

Linux

bash <skill>/scripts/gateway-profile.sh

代理调用方式

当用户要求分析 Gateway 重启性能时,OpenClaw 代理应使用以下方式调用:

Windows:

exec(command="powershell -ExecutionPolicy Bypass -File <skill>/scripts/gateway-profile.ps1", elevated=true)

Linux:

exec(command="bash <skill>/scripts/gateway-profile.sh", elevated=true)

其中 <skill> 应替换为实际路径,例如:

  • Linux: /home/tstj/.openclaw/workspace/skills/gateway-restart-profiler
  • Windows: C:\Users\<user>\.openclaw\workspace\skills\gateway-restart-profiler

代理调用时会自动重启 Gateway(先 stop 再 start),监听日志解析各阶段耗时,生成 HTML 可视化报告和文本摘要。

输出内容

  1. 实时日志监控 - 高亮显示各启动阶段
  2. HTML 可视化报告 - Chart.js 图表(柱状图 + 饼图)
  3. 详细数据表 - 含耗时百分比和可视化进度条
  4. 优化建议 - 自动识别超过30秒的阶段并给出建议
  5. 文本摘要 - 保存到 temp 目录

分析的阶段

阶段说明
配置加载读取 openclaw.json
身份验证连接认证服务
HTTP服务启动 Web 服务
CanvasCanvas 挂载
MCP服务MCP 协议服务
心跳服务心跳监控
模型加载加载 AI 模型
频道启动启动 QQ/Telegram 等频道
插件系统加载插件

优化建议解读

阶段耗时可能原因
配置加载 > 30s配置文件过大或损坏
身份验证 > 30s网络问题或认证服务故障
模型加载 > 30sOllama 响应慢,建议换用 API 模式
频道启动 > 30sQQ/Telegram 连接异常
插件系统 > 30snpm 依赖缺失,需重新安装

日志文件位置

  • Windows: C:\Users\<user>\AppData\Local\Temp\openclaw\
  • Linux: ~/.openclaw/logs/

示例输出

HTML 报告(用浏览器打开)包含:

  • 📊 耗时分布饼图 - 各阶段占总耗时比例
  • 📈 横向柱状图 - 按耗时排序,一目了然
  • 📋 详细数据表 - 毫秒/秒/占比/可视化进度条
  • 💡 优化建议 - 超过30秒的阶段高亮提示

控制台同时输出:

阶段耗时明细 (按耗时降序):
  频道启动           45000ms (45s)   ########################
  模型加载           32000ms (32s)   ################
  配置加载           12000ms (12s)   #########

优化建议:
  - [频道启动] 检查QQ/Telegram连接是否正常
  - [模型加载] Ollama响应慢,考虑换用API模式

[HTML图表报告已保存: ~/.openclaw/logs/gateway-profile-2026-04-12.html]
  → 用浏览器打开 HTML 文件查看可视化图表!

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Huo15 Openclaw Enhance

火一五·克劳德·龙虾增强插件 v5.7.8 — 全面适配 openclaw 2026.4.24:peerDep ^4.24 + build/compat 同步到 4.24 + 14 处 api.on 全部去掉 as any 改成 typed hook(hookName 联合类型 + handler 自动推断 Pl...

Registry SourceRecently Updated
General

Content Trend Analyzer

Aggregates and analyzes content trends across platforms to identify hot topics, user intent, content gaps, and generates data-driven article outlines.

Registry SourceRecently Updated
General

Prompt Debugger

Debug prompts that produce unexpected AI outputs — diagnose failure modes, identify ambiguity and conflicting instructions, test variations, compare model re...

Registry SourceRecently Updated
General

Indie Maker News

独行者 Daily - 变现雷达。读对一条新闻,少走一年弯路。每天5分钟,给创业者装上商业雷达。聚焦一人公司、副业、创业变现资讯,智能分类,行动导向。用户下载即能用,无需本地部署!

Registry SourceRecently Updated