ci: 放宽 10 万行性能护栏(kv 60s→120s / opfs 90s→150s)— CI debian runner 慢 2~3 倍且 maxWorkers=2 并行重型测试,84s 为健康性能(修复前悬崖 353s);护栏仍能拦截悬崖回归
CI / test (18.x) (push) Successful in 19m27s
CI / test (20.x) (push) Successful in 18m7s
CI / test (22.x) (push) Successful in 17m14s
CI / test (24.x) (push) Successful in 23m6s
CI / e2e (push) Successful in 9m58s

This commit is contained in:
thzxx
2026-08-11 09:02:35 +08:00
parent 95a3e418fd
commit a91ac368e2
+6 -3
View File
@@ -313,9 +313,11 @@ describe('AriaEngine — 生产负载验证', () => {
await engine.insert('big', rows); await engine.insert('big', rows);
} }
const insertMs = Date.now() - t0; const insertMs = Date.now() - t0;
// 性能护栏:修复前 353sbatch 32 起每批 8~11s 性能悬崖),修复后 <30s // 性能护栏:修复前 353sbatch 32 起每批 8~11s 性能悬崖),
// 修复后本机 ~30s。CIdebian runner + maxWorkers=2 并行重型测试)慢 2~3 倍,
// 护栏放宽到 120s —— 仍能拦截性能悬崖回归(353s >> 120s),不误报健康慢环境。
console.log(`10万行 kv 插入耗时: ${insertMs}ms`); console.log(`10万行 kv 插入耗时: ${insertMs}ms`);
expect(insertMs).toBeLessThan(60000); expect(insertMs).toBeLessThan(120000);
expect(await engine.count('big')).toBe(TOTAL); expect(await engine.count('big')).toBe(TOTAL);
// 全部 10 个 tag 索引查询完整 // 全部 10 个 tag 索引查询完整
@@ -360,8 +362,9 @@ describe('AriaEngine — 生产负载验证', () => {
await engine.insert('big', rows); await engine.insert('big', rows);
} }
const insertMs = Date.now() - t0; const insertMs = Date.now() - t0;
// 同上:CI 慢环境护栏放宽(本机 ~25s)
console.log(`10万行 opfs 插入耗时: ${insertMs}ms`); console.log(`10万行 opfs 插入耗时: ${insertMs}ms`);
expect(insertMs).toBeLessThan(90000); expect(insertMs).toBeLessThan(150000);
expect(await engine.count('big')).toBe(TOTAL); expect(await engine.count('big')).toBe(TOTAL);
for (let t = 0; t < 10; t++) { for (let t = 0; t < 10; t++) {
const viaIdx = await engine.find('big', { table: 'big', where: { tag: `t${t}` } }); const viaIdx = await engine.find('big', { table: 'big', where: { tag: `t${t}` } });