惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
WordPress大学
WordPress大学
U
Unit 42
I
InfoQ
A
About on SuperTechFans
宝玉的分享
宝玉的分享
J
Java Code Geeks
博客园 - 司徒正美
爱范儿
爱范儿
Engineering at Meta
Engineering at Meta
G
Google Developers Blog
人人都是产品经理
人人都是产品经理
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
腾讯CDC
Recent Announcements
Recent Announcements

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
[Docs] Document gateway benchmark probes (#83866) · openc...
samzong · 2026-05-20 · via Recent Commits to openclaw:main

@@ -124,6 +124,94 @@ Checked-in fixture:

124124

- Refresh with `pnpm test:startup:bench:update`

125125

- Compare current results against the fixture with `pnpm test:startup:bench:check`

126126127+

## Gateway startup bench

128+129+

Script: [`scripts/bench-gateway-startup.ts`](https://github.com/openclaw/openclaw/blob/main/scripts/bench-gateway-startup.ts)

130+131+

The benchmark defaults to the built CLI entry at `dist/entry.js`; run

132+

`pnpm build` before using the package-script commands. To measure the source

133+

runner instead, pass `--entry scripts/run-node.mjs` and keep those results

134+

separate from built-entry baselines.

135+136+

Usage:

137+138+

- `pnpm test:startup:gateway -- --runs 5 --warmup 1`

139+

- `pnpm test:startup:gateway -- --case default --runs 10 --warmup 1`

140+

- `pnpm test:startup:gateway -- --case skipChannels --case fiftyPlugins --runs 5`

141+

- `node --import tsx scripts/bench-gateway-startup.ts --case default --runs 5 --output .artifacts/gateway-startup.json`

142+

- `node --import tsx scripts/bench-gateway-startup.ts --case default --runs 3 --cpu-prof-dir .artifacts/gateway-startup-cpu`

143+144+

Case ids:

145+146+

- `default`: normal Gateway startup.

147+

- `skipChannels`: Gateway startup with channel startup skipped.

148+

- `oneInternalHook`: one configured internal hook.

149+

- `allInternalHooks`: all internal hooks.

150+

- `fiftyPlugins`: 50 manifest plugins.

151+

- `fiftyStartupLazyPlugins`: 50 startup-lazy manifest plugins.

152+153+

Output includes first process output, `/healthz`, `/readyz`, HTTP listen log time,

154+

Gateway ready log time, CPU time, CPU core ratio, max RSS, heap, startup trace

155+

metrics, event-loop delay, and plugin lookup-table detail metrics. The script

156+

enables `OPENCLAW_GATEWAY_STARTUP_TRACE=1` in the child Gateway environment.

157+158+

Read `/healthz` as liveness: the HTTP server can answer. Read `/readyz` as

159+

usable readiness: startup plugin sidecars, channels, and ready-critical

160+

post-attach work have settled. Gateway startup hooks are dispatched

161+

asynchronously and are not part of the readiness guarantee. Ready log time is the

162+

Gateway's internal ready log timestamp; it is useful for process-side

163+

attribution but is not a substitute for the external `/readyz` probe.

164+165+

Use JSON output or `--output` when comparing changes. Use `--cpu-prof-dir` only

166+

after the trace output points at import, compile, or CPU-bound work that cannot

167+

be explained from phase timings alone. Do not compare source-runner results with

168+

built `dist/entry.js` results as the same baseline.

169+170+

## Gateway restart bench

171+172+

Script: [`scripts/bench-gateway-restart.ts`](https://github.com/openclaw/openclaw/blob/main/scripts/bench-gateway-restart.ts)

173+174+

The restart benchmark is supported on macOS and Linux only. It uses SIGUSR1 for

175+

in-process restarts and fails immediately on Windows.

176+177+

The benchmark defaults to the built CLI entry at `dist/entry.js`; run

178+

`pnpm build` before using the package-script commands. To measure the source

179+

runner instead, pass `--entry scripts/run-node.mjs` and keep those results

180+

separate from built-entry baselines.

181+182+

Usage:

183+184+

- `pnpm test:restart:gateway -- --case skipChannels --runs 1 --restarts 5`

185+

- `pnpm test:restart:gateway -- --case default --runs 3 --restarts 3 --warmup 1`

186+

- `pnpm test:restart:gateway -- --case skipChannelsAcpxProbe --case skipChannelsNoAcpxProbe --runs 1 --restarts 5`

187+

- `node --import tsx scripts/bench-gateway-restart.ts --case fiftyPlugins --runs 1 --restarts 5 --output .artifacts/gateway-restart.json`

188+

- `node --import tsx scripts/bench-gateway-restart.ts --json`

189+190+

Case ids:

191+192+

- `skipChannels`: restart with channels skipped.

193+

- `skipChannelsAcpxProbe`: restart with channels skipped and ACPX startup probe on.

194+

- `skipChannelsNoAcpxProbe`: restart with channels skipped and ACPX startup probe off.

195+

- `default`: normal restart.

196+

- `fiftyPlugins`: restart with 50 manifest plugins.

197+198+

Output includes next `/healthz`, next `/readyz`, downtime, restart ready timing,

199+

CPU, RSS, startup trace metrics for the replacement process, and restart trace

200+

metrics for signal handling, active-work drain, close phases, next start, ready

201+

timing, and memory snapshots. The script enables

202+

`OPENCLAW_GATEWAY_STARTUP_TRACE=1` and `OPENCLAW_GATEWAY_RESTART_TRACE=1` in the

203+

child Gateway environment.

204+205+

Use this benchmark when a change touches restart signaling, close handlers,

206+

startup-after-restart, sidecar shutdown, service handoff, or readiness after

207+

restart. Start with `skipChannels` when isolating Gateway mechanics from channel

208+

startup. Use `default` or plugin-heavy cases only after the narrow case explains

209+

the restart path.

210+211+

Trace metrics are attribution hints, not verdicts. A restart change should be

212+

judged from multiple samples, the matching owner span, `/healthz` and `/readyz`

213+

behavior, and the user-visible restart contract.

214+127215

## Onboarding E2E (Docker)

128216129217

Docker is optional; this is only needed for containerized onboarding smoke tests.