mirror of https://github.com/openclaw/openclaw.git
perf: expand vitest thread lanes
This commit is contained in:
parent
aa80b1eb7c
commit
95ae8aabb7
|
|
@ -44,7 +44,7 @@ export function parseArgs(argv) {
|
|||
}
|
||||
if (arg === "--min-duration-ms") {
|
||||
const parsed = Number.parseFloat(argv[i + 1] ?? "");
|
||||
if (Number.isFinite(parsed) && parsed > 0) {
|
||||
if (Number.isFinite(parsed) && parsed >= 0) {
|
||||
args.minDurationMs = parsed;
|
||||
}
|
||||
i += 1;
|
||||
|
|
@ -52,7 +52,7 @@ export function parseArgs(argv) {
|
|||
}
|
||||
if (arg === "--min-gain-ms") {
|
||||
const parsed = Number.parseFloat(argv[i + 1] ?? "");
|
||||
if (Number.isFinite(parsed) && parsed > 0) {
|
||||
if (Number.isFinite(parsed) && parsed >= 0) {
|
||||
args.minGainMs = parsed;
|
||||
}
|
||||
i += 1;
|
||||
|
|
|
|||
|
|
@ -341,6 +341,10 @@
|
|||
"file": "src/plugins/contracts/wizard.contract.test.ts",
|
||||
"reason": "Measured ~9% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/channels/plugins/contracts/outbound-payload.contract.test.ts",
|
||||
"reason": "Measured ~15% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/plugins/install.test.ts",
|
||||
"reason": "Measured ~18% faster under threads than forks on this host while keeping the file green."
|
||||
|
|
@ -357,6 +361,18 @@
|
|||
"file": "src/config/schema.help.quality.test.ts",
|
||||
"reason": "Measured ~13% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/config/sessions/store.pruning.integration.test.ts",
|
||||
"reason": "Measured ~11% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/config/sessions.test.ts",
|
||||
"reason": "Measured ~16% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/config/sessions/store.pruning.test.ts",
|
||||
"reason": "Measured ~13% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/cron/isolated-agent.uses-last-non-empty-agent-text-as.test.ts",
|
||||
"reason": "Measured ~15% faster under threads than forks on this host while keeping the file green."
|
||||
|
|
@ -365,6 +381,30 @@
|
|||
"file": "src/cron/isolated-agent.skips-delivery-without-whatsapp-recipient-besteffortdeliver-true.test.ts",
|
||||
"reason": "Measured ~13% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/cron/isolated-agent/run.cron-model-override.test.ts",
|
||||
"reason": "Measured ~25% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/cron/isolated-agent/run.skill-filter.test.ts",
|
||||
"reason": "Measured ~15% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/cron/isolated-agent.delivers-response-has-heartbeat-ok-but-includes.test.ts",
|
||||
"reason": "Measured ~12% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/cron/isolated-agent/delivery-dispatch.named-agent.test.ts",
|
||||
"reason": "Measured ~14% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/cron/service.store-load-invalid-main-job.test.ts",
|
||||
"reason": "Measured ~16% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/cron/service.store-migration.test.ts",
|
||||
"reason": "Measured ~14% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/plugins/loader.test.ts",
|
||||
"reason": "Measured ~13% faster under threads than forks on this host while keeping the file green."
|
||||
|
|
@ -409,10 +449,22 @@
|
|||
"file": "src/infra/outbound/agent-delivery.test.ts",
|
||||
"reason": "Measured ~17% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/infra/outbound/outbound-policy.test.ts",
|
||||
"reason": "Measured ~11% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/infra/update-runner.test.ts",
|
||||
"reason": "Measured ~11% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/infra/fs-pinned-write-helper.test.ts",
|
||||
"reason": "Measured ~13% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/infra/run-node.test.ts",
|
||||
"reason": "Measured ~9% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/infra/fs-safe.test.ts",
|
||||
"reason": "Measured ~17% faster under threads than forks on this host while keeping the file green."
|
||||
|
|
@ -421,6 +473,10 @@
|
|||
"file": "src/infra/archive-staging.test.ts",
|
||||
"reason": "Measured ~12% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/infra/state-migrations.test.ts",
|
||||
"reason": "Measured ~17% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/acp/server.startup.test.ts",
|
||||
"reason": "Measured ~11% faster under threads than forks on this host while keeping the file green."
|
||||
|
|
@ -429,6 +485,10 @@
|
|||
"file": "src/acp/client.test.ts",
|
||||
"reason": "Measured ~18% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/acp/translator.cancel-scoping.test.ts",
|
||||
"reason": "Measured ~10% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/daemon/schtasks.startup-fallback.test.ts",
|
||||
"reason": "Measured ~15% faster under threads than forks on this host while keeping the file green."
|
||||
|
|
@ -461,6 +521,10 @@
|
|||
"file": "ui/src/ui/views/chat.test.ts",
|
||||
"reason": "Measured ~25% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/tui/tui-session-actions.test.ts",
|
||||
"reason": "Measured ~11% faster under threads than forks on this host while keeping the file green."
|
||||
},
|
||||
{
|
||||
"file": "src/cli/program/preaction.test.ts",
|
||||
"reason": "Measured ~21% faster under threads than forks on this host while keeping the file green."
|
||||
|
|
|
|||
|
|
@ -31,6 +31,13 @@ describe("scripts/test-find-thread-candidates parseArgs", () => {
|
|||
files: ["src/a.test.ts"],
|
||||
});
|
||||
});
|
||||
|
||||
it("accepts zero thresholds for explicit deep scans", () => {
|
||||
expect(parseArgs(["--min-duration-ms", "0", "--min-gain-ms", "0"])).toMatchObject({
|
||||
minDurationMs: 0,
|
||||
minGainMs: 0,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("scripts/test-find-thread-candidates exclusions", () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue