diff --git a/packages/fs/tool-fs-search/README.md b/packages/fs/tool-fs-search/README.md index 19b00fc5a2..942da7f24a 100644 --- a/packages/fs/tool-fs-search/README.md +++ b/packages/fs/tool-fs-search/README.md @@ -114,11 +114,12 @@ Each call resolves the packaged binary (`@vscode/ripgrep`, or the executable's ` After `pnpm run build`, compile the package-local diagnostic with external runtime dependencies, then run it under plain Node: ```sh +cd packages/fs/tool-fs-search node --input-type=module <<'JS' import { build } from 'tsdown'; -await build({ config: false, tsconfig: false, dts: false, entry: 'packages/fs/tool-fs-search/tests/glob-native.perf.ts', outDir: 'packages/fs/tool-fs-search/tests/.dsh-build', clean: false, deps: { neverBundle: [/^[^./]/] } }); +await build({ config: false, tsconfig: false, dts: false, entry: 'tests/glob-native.perf.ts', outDir: 'tests/.dsh-build', clean: false, deps: { neverBundle: [/^[^./]/] } }); JS -node packages/fs/tool-fs-search/tests/.dsh-build/glob-native.perf.mjs +node tests/.dsh-build/glob-native.perf.mjs ``` The diagnostic creates 20,000 unrelated files and six matches, then measures five `ctx.tools.execute()` calls through the Native executor with a real Agent, working-directory service, and local subprocess backend. It reports raw timings, the median, and a hash of the complete value, text, and presentation metadata. `--plugin ` selects another search-package revision; `--workspace ` opts into a read-only existing workspace instead of the synthetic tree. Setup, model generation, UI, and Session persistence are excluded; there is no timing threshold. diff --git a/packages/fs/tool-fs-search/README.zh.md b/packages/fs/tool-fs-search/README.zh.md index 1157003ad9..9ce05936f3 100644 --- a/packages/fs/tool-fs-search/README.zh.md +++ b/packages/fs/tool-fs-search/README.zh.md @@ -114,11 +114,12 @@ Node 部署在受支持的 macOS、Linux 与 Windows 目标上获得 `@vscode/ri 运行 `pnpm run build` 后,将包内诊断脚本编译为外部引用运行时依赖的产物,再用普通 Node 运行: ```sh +cd packages/fs/tool-fs-search node --input-type=module <<'JS' import { build } from 'tsdown'; -await build({ config: false, tsconfig: false, dts: false, entry: 'packages/fs/tool-fs-search/tests/glob-native.perf.ts', outDir: 'packages/fs/tool-fs-search/tests/.dsh-build', clean: false, deps: { neverBundle: [/^[^./]/] } }); +await build({ config: false, tsconfig: false, dts: false, entry: 'tests/glob-native.perf.ts', outDir: 'tests/.dsh-build', clean: false, deps: { neverBundle: [/^[^./]/] } }); JS -node packages/fs/tool-fs-search/tests/.dsh-build/glob-native.perf.mjs +node tests/.dsh-build/glob-native.perf.mjs ``` 诊断脚本创建 20,000 个无关文件和六个匹配文件,然后通过 Native executor 测量五次 `ctx.tools.execute()` 调用,使用真实 Agent、工作目录服务和本地 subprocess 后端。输出包括原始耗时、中位数,以及完整值、文本和展示元数据的哈希。`--plugin ` 选择其他搜索包版本;`--workspace ` 显式选择只读的现有工作区,替代合成目录。计时排除初始化、模型生成、UI 和 Session 持久化;不设耗时阈值。