From 3c8d9716d91ad942837ad2fe642ada49a9fdb6e8 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Sat, 2 May 2026 16:08:59 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@20bb52e42ca1c468b2a2dbace3e3a840096f5ad6 --- .openclaw-sync/source.json | 4 ++-- docs/help/debugging.md | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 34a95f0d7..948692354 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "563dca82f4290a8d085be5bea10334545c1c7e8d", - "syncedAt": "2026-05-02T16:01:12.676Z" + "sha": "20bb52e42ca1c468b2a2dbace3e3a840096f5ad6", + "syncedAt": "2026-05-02T16:06:57.004Z" } diff --git a/docs/help/debugging.md b/docs/help/debugging.md index e8fa6619c..60a771bce 100644 --- a/docs/help/debugging.md +++ b/docs/help/debugging.md @@ -246,6 +246,23 @@ Disable auto-attach while keeping tmux management: OPENCLAW_GATEWAY_WATCH_ATTACH=0 pnpm gateway:watch ``` +Profile watched Gateway CPU time when debugging startup/runtime hotspots: + +```bash +pnpm gateway:watch --benchmark +``` + +The watch wrapper consumes `--benchmark` before invoking the Gateway and writes +one V8 `.cpuprofile` per Gateway child exit under +`.artifacts/gateway-watch-profiles/`. Stop or restart the watched gateway to +flush the current profile, then open it with Chrome DevTools or Speedscope: + +```bash +npx speedscope .artifacts/gateway-watch-profiles/*.cpuprofile +``` + +Use `--benchmark-dir ` when you want profiles somewhere else. + The tmux wrapper carries common non-secret runtime selectors such as `OPENCLAW_PROFILE`, `OPENCLAW_CONFIG_PATH`, `OPENCLAW_STATE_DIR`, `OPENCLAW_GATEWAY_PORT`, and `OPENCLAW_SKIP_CHANNELS` into the pane. Put