Skip to content

perf: add performance test case - #8

Merged
hustcc merged 1 commit into
masterfrom
perf-test
Jul 9, 2026
Merged

perf: add performance test case#8
hustcc merged 1 commit into
masterfrom
perf-test

Conversation

@hustcc

@hustcc hustcc commented Jul 9, 2026

Copy link
Copy Markdown
Member

性能测试已移至单独的 test/perf.test.ts 文件。

测试结果:

  • 加载 100 个文档: 2379ms
  • 平均每文档: 23.79ms

全部 126 个测试通过 ✓

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a performance test suite in test/perf.test.ts to benchmark loading 100 random documents into the Context. The review feedback correctly identifies a potential resource leak: if an assertion fails or an error is thrown during the test, ctx.close() will not be called, which can leave database connections open and cause cleanup failures in afterAll. It is recommended to wrap the context operations in a nested try...finally block to guarantee that ctx.close() is always executed.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread test/perf.test.ts
@hustcc
hustcc merged commit 0edd6f5 into master Jul 9, 2026
2 checks passed
@hustcc
hustcc deleted the perf-test branch July 9, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant