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

推荐订阅源

F
Full Disclosure
Recorded Future
Recorded Future
T
Tenable Blog
S
Securelist
C
CERT Recently Published Vulnerability Notes
T
Threatpost
S
Schneier on Security
A
Arctic Wolf
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
K
Kaspersky official blog
T
True Tiger Recordings
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
小众软件
小众软件
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Spread Privacy
Spread Privacy
Malwarebytes
Malwarebytes
P
Proofpoint News Feed
F
Fox-IT International blog
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
量子位
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Project Zero
Project Zero
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
I
Intezer
博客园_首页
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security

Recent Commits to openclaw:main

fix(filefetch): wrap fetched text as external content (#87062) · openclaw/openclaw@42b8898 fix(ci): satisfy script oxlint sort rule · openclaw/openclaw@ffe1213 ci: tolerate gateway status help probe hangs fix(memory-core): close providers created during shutdown · openclaw/openclaw@e982302 fix(gateway): bound e2e HTTP helper responses · openclaw/openclaw@6509da7 fix(agents): honor per-agent thinking defaults for ingress runs (#86689) · openclaw/openclaw@bba4298 fix(sessions): avoid parsing object cache writes · openclaw/openclaw@f6599ed test(cli): allow mac startup memory overhead · openclaw/openclaw@978cb6a fix(crabbox): show broker url in auth guard fix(crabbox): require broker auth for aws proof · openclaw/openclaw@7c432d2 fix(docker): bound kitchen sink plugin commands · openclaw/openclaw@d353dc1 fix(cli): bound startup memory probes · openclaw/openclaw@2b5fba1 test: skip claude resume live proof without cli · openclaw/openclaw@049d6c9 fix(agents): force SIGKILL for stuck MCP stdio children (#86739) · openclaw/openclaw@71d24f9 fix(codex): avoid false queued terminal idle timeout (#87096) · openclaw/openclaw@1dbd9a3 fix(gateway): fail hot cpu scenario checks · openclaw/openclaw@bfddd45 fix(cron): preview no-deliver message targets · openclaw/openclaw@c9ca7fc perf: reduce gateway cpu churn · openclaw/openclaw@a43da0c fix(gateway): harden runtime smoke checks fix(docker): bound plugin sweep reads · openclaw/openclaw@86ff2cf test: make docker package timeout proof robust · openclaw/openclaw@94cd364 fix(anthropic): pass system prompt on resumed claude-cli sessions · openclaw/openclaw@84e6282 fix(skills): sync plugin skills to sandbox workspaces · openclaw/openclaw@d8f6d65 docs: show PR LOC in maintainer reviews · openclaw/openclaw@8b8e088 fix(codex): raise dynamic tool timeout · openclaw/openclaw@0f18d52 fix(cli): handle Bun launcher module misses · openclaw/openclaw@a1934e9 fix(docker): bound plugin sweep commands · openclaw/openclaw@e46b92c docs: improve PR blame provenance · openclaw/openclaw@ebfcddb fix: scrub serialized tool-call text from replies (#86924) · openclaw/openclaw@ee655f4 test: fix CI type checks · openclaw/openclaw@eac918d fix(e2e): resolve mac update smoke commands from PATH · openclaw/openclaw@b654117 test(docs): avoid URL default stringification · openclaw/openclaw@61fa2b2 test: speed up plugin runtime tests · openclaw/openclaw@9f7584c fix(docs): use Cloudflare docs search API · openclaw/openclaw@69d84d7 test: speed up run-node infra tests · openclaw/openclaw@7e913c0 fix(docker): bound e2e image builds · openclaw/openclaw@6ef0cbb fix(agents): unwrap standalone message tool JSON (#86626) · openclaw/openclaw@030861e fix(slack): fast-path wildcard open DM policy · openclaw/openclaw@9cd1d27 ci: retry corepack pnpm activation · openclaw/openclaw@d122839 test: bound gateway live model discovery · openclaw/openclaw@dc1e6fb test: speed up plugin install suites · openclaw/openclaw@75fc0bc fix(irc): use channel routes for group inbound targets · openclaw/openclaw@bf8be79 Preserve xAI usage limit errors in local TUI (#86614) · openclaw/openclaw@532494b fix: filter claude autoreview streaming · openclaw/openclaw@fa384d4 fix(cli-runner): scale Claude CLI reseed history automatically · openclaw/openclaw@474b1e0 test: speed up infra test hotspots · openclaw/openclaw@8592352 fix(e2e): keep mac smoke commands bounded without timeout · openclaw/openclaw@3e70144 fix(live): classify Z.ai plan denials as billing drift · openclaw/openclaw@693f06d fix(config): render transform-backed config schema inputs (#67328) · openclaw/openclaw@678a0ee perf: speed up test hotspots · openclaw/openclaw@980d73d feat: stream autoreview progress · openclaw/openclaw@322ceb3 test: improve full-suite failure summaries · openclaw/openclaw@8f1fb67 fix(e2e): require bounded helper timeouts · openclaw/openclaw@0028c2f fix(ui): eliminate double scrollbar on Logs view · openclaw/openclaw@068d88c test: speed up hot test fixtures · openclaw/openclaw@0f608bc fix(auto-reply): suppress repeated silent tokens (#86848) · openclaw/openclaw@8ec2b2d fix(commands): preserve async skill commands · openclaw/openclaw@1313e15 fix(docker): bound telegram npm installs · openclaw/openclaw@130464e fix(mac): use corepack pnpm for app packaging · openclaw/openclaw@728b61a fix: mark ios watch app as watchkit app · openclaw/openclaw@1600bcd docs: explain bundled plugin npm override · openclaw/openclaw@40fa750 fix: keep bundled OpenClaw plugins image-owned · openclaw/openclaw@771675e test: fix bundled install mock typing · openclaw/openclaw@669bfdd fix: preserve whatsapp inbound batch order · openclaw/openclaw@84a33c7 perf: cache npm globalconfig lookups · openclaw/openclaw@3f524a6 fix(daemon): ignore recursive Windows gateway wrapper · openclaw/openclaw@126a336 fix(docker): bound live setup commands · openclaw/openclaw@eb15c44 fix: restore ios build stability · openclaw/openclaw@1daef79 feat(plugin-sdk): add reaction approval helpers (#86735) · openclaw/openclaw@7d6b7f4 test(auto-reply): type manifest catalog harness mock · openclaw/openclaw@4f83cd6 fix(docker): bound live docker runs · openclaw/openclaw@96307ca test(auto-reply): mock manifest model catalog in trigger harness · openclaw/openclaw@989d449 fix(crabbox): scope env-wrapped macOS bootstrap · openclaw/openclaw@2f7bfdb fix(gateway): reject RPCs from invalidated device-token clients durin… · openclaw/openclaw@1e1cf14 fix(channel): handle plugin channel markdown fallback · openclaw/openclaw@6158742 fix(docker): require bounded e2e docker commands · openclaw/openclaw@3736d7b fix(codex): share native hook relay registry (#73950) · openclaw/openclaw@6729dea fix(release): stabilize plugin prerelease tests · openclaw/openclaw@5a684c4 fix(diagnostics): flush OTel trace batches · openclaw/openclaw@c4b9f54 fix(memory): reject invalid CLI numeric options · openclaw/openclaw@d569e41 fix(codex): bound app-server timeout fallout · openclaw/openclaw@5a7d5c6 fix(agents): keep model browse normalization bounded · openclaw/openclaw@9fc71e9 fix: stabilize media-related tests · openclaw/openclaw@a818556 fix(ci): preserve docker pull retry failures · openclaw/openclaw@be2213e fix(build): stabilize shrinkwrap generation · openclaw/openclaw@538b537 fix(ui): ignore stale running session rows · openclaw/openclaw@1705189 ci: support windows node download fallback · openclaw/openclaw@bb48fcf test(agents): pin native anthropic replay policy · openclaw/openclaw@acd3ce0 fix(status): surface systemd gateway hygiene (#86976) · openclaw/openclaw@0a085bf fix(ui): show failed tool results as errors (#85786) ci: allow Windows Node 22 patch range · openclaw/openclaw@ce4db4f ci: enforce Node 22 floor in setup helper · openclaw/openclaw@1d972af Fix status JSON plugin scan (#87001) · openclaw/openclaw@f3e6158 fix(telegram): preserve command slots for aliases (#85270) · openclaw/openclaw@77505da fix(agents): handle deferred maintenance drain · openclaw/openclaw@94fb547 test: keep legacy tool-result error proof ci: fix post-merge Rastermill checks · openclaw/openclaw@b546998 fix(agents): mark repaired legacy tool results errored · openclaw/openclaw@8523d32 docs(changelog): note rastermill exif fix docs(changelog): regroup 2026.5.26 release notes · openclaw/openclaw@a6973ab
perf: trim gateway runtime hotspots · openclaw/openclaw@2035f38
steipete · 2026-05-27 · via Recent Commits to openclaw:main

@@ -0,0 +1,106 @@

1+

#!/usr/bin/env node

2+

import fs from "node:fs";

3+

import path from "node:path";

4+

import process from "node:process";

5+6+

const DEFAULT_LIMIT = 30;

7+8+

function parseArgs(argv) {

9+

const files = [];

10+

let limit = DEFAULT_LIMIT;

11+

for (let index = 0; index < argv.length; index += 1) {

12+

const arg = argv[index];

13+

if (arg === "--limit") {

14+

const raw = argv[index + 1];

15+

index += 1;

16+

const parsed = Number.parseInt(raw ?? "", 10);

17+

if (Number.isFinite(parsed) && parsed > 0) {

18+

limit = parsed;

19+

}

20+

continue;

21+

}

22+

files.push(arg);

23+

}

24+

return { files, limit };

25+

}

26+27+

function formatUrl(url) {

28+

if (!url) {

29+

return "(native)";

30+

}

31+

const cwdPrefix = `${process.cwd()}${path.sep}`;

32+

return url

33+

.replace(/^file:\/\//u, "")

34+

.replace(cwdPrefix, "")

35+

.replace(/^.*\/node_modules\//u, "node_modules/")

36+

.replace(/^.*\/dist\//u, "dist/");

37+

}

38+39+

function groupUrl(url) {

40+

const formatted = formatUrl(url);

41+

if (formatted.startsWith("node:")) {

42+

return formatted.split(":").slice(0, 2).join(":");

43+

}

44+

if (formatted.startsWith("node_modules/")) {

45+

return formatted.split("/").slice(0, 3).join("/");

46+

}

47+

if (formatted.startsWith("dist/")) {

48+

return formatted.split("/").slice(0, 2).join("/");

49+

}

50+

return formatted;

51+

}

52+53+

function add(map, key, micros) {

54+

map.set(key, (map.get(key) ?? 0) + micros);

55+

}

56+57+

function summarizeProfile(file, limit) {

58+

const profile = JSON.parse(fs.readFileSync(file, "utf8"));

59+

const nodes = new Map(profile.nodes.map((node) => [node.id, node]));

60+

const samples = Array.isArray(profile.samples) ? profile.samples : [];

61+

const deltas = Array.isArray(profile.timeDeltas) ? profile.timeDeltas : [];

62+

const byFrame = new Map();

63+

const byModule = new Map();

64+65+

for (let index = 0; index < samples.length; index += 1) {

66+

const node = nodes.get(samples[index]);

67+

if (!node) {

68+

continue;

69+

}

70+

const frame = node.callFrame ?? {};

71+

const micros = deltas[index] ?? 1000;

72+

const url = formatUrl(frame.url ?? "");

73+

const line =

74+

typeof frame.lineNumber === "number" && frame.lineNumber >= 0

75+

? `:${frame.lineNumber + 1}`

76+

: "";

77+

const functionName = frame.functionName || "(anonymous)";

78+

add(byFrame, `${functionName}\t${url}${line}`, micros);

79+

add(byModule, groupUrl(frame.url ?? ""), micros);

80+

}

81+82+

const durationMs = ((profile.endTime ?? 0) - (profile.startTime ?? 0)) / 1000;

83+

console.log(`\n${file}`);

84+

console.log(`duration_ms: ${durationMs.toFixed(1)} samples: ${samples.length}`);

85+

console.log("top_frames:");

86+

for (const [key, micros] of [...byFrame.entries()]

87+

.sort((left, right) => right[1] - left[1])

88+

.slice(0, limit)) {

89+

console.log(`${(micros / 1000).toFixed(1)}ms\t${key}`);

90+

}

91+

console.log("top_modules:");

92+

for (const [key, micros] of [...byModule.entries()]

93+

.sort((left, right) => right[1] - left[1])

94+

.slice(0, limit)) {

95+

console.log(`${(micros / 1000).toFixed(1)}ms\t${key}`);

96+

}

97+

}

98+99+

const { files, limit } = parseArgs(process.argv.slice(2));

100+

if (files.length === 0) {

101+

console.error("usage: scripts/perf/summarize-cpuprofile.mjs [--limit N] <profile...>");

102+

process.exit(2);

103+

}

104+

for (const file of files) {

105+

summarizeProfile(file, limit);

106+

}