-
Notifications
You must be signed in to change notification settings - Fork 1
perf(scale): 50k 压测 harness + resume 计数与 CI artifact 修复 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
dbf563e
perf(scale): 压测 harness 支持续跑与断言,新增 50k CI 复跑 workflow
FPSZ cd5e7e1
perf(scale): 修复压测 harness 的 resume 重复计数与 CI artifact 上传
FPSZ ce1616b
docs(release): 补齐 1.5.2 release notes 与文档索引
FPSZ 23bee50
chore(release): 按评审把 release notes 从本 PR 摘出
FPSZ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: Perf Scale | ||
|
|
||
| # 50k 规模压测 CI 复跑:手动触发(可调参)+ 每周日定时全量 50k。 | ||
| # 结论阈值:并发 P50 / 顺序 P50(争用系数)不得超过 2.0,超标即本 run 失败。 | ||
| # 报告 JSON 作为 artifact 上传:perf-scale-report-<docs>/perf_scale_ci_report.json | ||
| # 本地复跑命令见 docs/qa/PERF_SCALE_50K.md。 | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| docs: | ||
| description: '文档数(默认 50000 全量;排查时可跑 10000/1000 快档)' | ||
| required: false | ||
| default: '50000' | ||
| queries: | ||
| description: '查询数' | ||
| required: false | ||
| default: '300' | ||
| max_contention_factor: | ||
| description: '争用系数门槛(默认 2.0)' | ||
| required: false | ||
| default: '2.0' | ||
| schedule: | ||
| - cron: '34 2 * * 0' # 每周日 02:34 UTC(避开整点洪峰) | ||
|
|
||
| concurrency: | ||
| group: perf-scale | ||
| # false:手动触发与周日定时 50k 并行时排队等待,而不是取消进行中的 2.5h 运行 | ||
| # (与 desktop-release.yml 的发布型 job 先例一致)。 | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| perf-scale: | ||
| name: perf-scale (docs=${{ github.event.inputs.docs || '50000' }}) | ||
| runs-on: ubuntu-latest | ||
| # 50k 实测 ~2.5h(含建索引),留足编译与调度余量 | ||
| timeout-minutes: 360 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Disk space check (50k DB 约 11GB,注意 runner 14GB 上限) | ||
| run: df -h . | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Restore Rust cache | ||
| uses: Swatinem/rust-cache@v2 | ||
|
|
||
| - name: Run perf scale (offline deterministic, no rerank) | ||
| shell: bash | ||
| run: | | ||
| cargo run --release -p memori-core --example perf_scale -- \ | ||
| --docs "${{ github.event.inputs.docs || '50000' }}" \ | ||
| --sections 50 \ | ||
| --queries "${{ github.event.inputs.queries || '300' }}" \ | ||
| --concurrency 8 \ | ||
| --report target/perf_scale_ci_report.json \ | ||
| --max-contention-factor "${{ github.event.inputs.max_contention_factor || '2.0' }}" | ||
|
|
||
| - name: Upload report artifact | ||
| # 断言失败时才是最需要看报告的时候:必须 always(),否则恰好在 run FAIL 时丢掉 artifact。 | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: perf-scale-report-${{ github.event.inputs.docs || '50000' }} | ||
| path: target/perf_scale_ci_report.json | ||
| if-no-files-found: error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
问题 (bug_risk): 当
--start-doc大于零,但指定的数据库不存在时,代码会创建一个新的空数据库,并且只为start_doc..docs范围内的文档建立数据;此时,报告却声称包含完整的docs文档集,尽管前面的文档并不存在。触发条件: 使用缺失、已删除或指定错误的
--db-path开始续跑时。建议修复: 除非数据库存在且包含预期的既有文档集,否则应立即失败;或者在继续之前,显式地为缺失的前缀文档建立数据。
Original comment in English
issue (bug_risk): When
--start-docis greater than zero but the specified database does not already exist, the code creates a new empty database and seeds only documents instart_doc..docs; the report then claims the fulldocscorpus even though the earlier documents are absent.Triggers: When a resume is started with a missing, deleted, or incorrectly specified
--db-path.Suggested fix: Fail fast unless the database exists and contains the expected prior corpus, or explicitly seed the missing prefix before continuing.