feat: 第三优先级完善 — CI/CD、PyPI、pre-commit、CHANGELOG、贡献指南、基准测试、ADR
CI / Test (Python 3.13) (push) Has been cancelled
CI / Test (Python 3.13) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""检索性能基准测试."""
|
||||
import pytest
|
||||
|
||||
|
||||
def test_bench_search_top5(benchmark, benchmark_searcher):
|
||||
"""top_k=5 检索耗时."""
|
||||
benchmark(benchmark_searcher.search, "Python 向量数据库", top_k=5)
|
||||
|
||||
|
||||
def test_bench_search_top20(benchmark, benchmark_searcher):
|
||||
"""top_k=20 检索耗时."""
|
||||
benchmark(benchmark_searcher.search, "Rust 编程语言 GPU", top_k=20)
|
||||
|
||||
|
||||
def test_bench_search_cold_start(benchmark, benchmark_searcher):
|
||||
"""冷启动检索耗时."""
|
||||
benchmark(benchmark_searcher.search, "GPU 加速 深度学习 嵌入", top_k=10)
|
||||
Reference in New Issue
Block a user