mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-02 00:25:06 +08:00
Feat: Benchmark CLI additions and documentation (#12536)
### What problem does this PR solve? This PR adds a dedicated HTTP benchmark CLI for RAGFlow chat and retrieval endpoints so we can measure latency/QPS. ### Type of change - [x] Documentation Update - [x] Other (please describe): Adds a CLI benchmarking tool for chat/retrieval latency/QPS --------- Co-authored-by: Liu An <asiro@qq.com>
This commit is contained in:
25
test/benchmark/run_retrieval.sh
Executable file
25
test/benchmark/run_retrieval.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
|
||||
|
||||
: "${ZHIPU_AI_API_KEY:?ZHIPU_AI_API_KEY is required}"
|
||||
|
||||
PYTHONPATH="${REPO_ROOT}/test" uv run -m benchmark retrieval \
|
||||
--base-url http://127.0.0.1:9380 \
|
||||
--allow-register \
|
||||
--login-email "qa@infiniflow.org" \
|
||||
--login-password "123" \
|
||||
--bootstrap-llm \
|
||||
--llm-factory ZHIPU-AI \
|
||||
--llm-api-key "$ZHIPU_AI_API_KEY" \
|
||||
--dataset-name "bench_dataset" \
|
||||
--dataset-payload '{"name":"bench_dataset","embedding_model":"BAAI/bge-small-en-v1.5@Builtin"}' \
|
||||
--document-path "${SCRIPT_DIR}/test_docs/Doc1.pdf" \
|
||||
--document-path "${SCRIPT_DIR}/test_docs/Doc2.pdf" \
|
||||
--document-path "${SCRIPT_DIR}/test_docs/Doc3.pdf" \
|
||||
--question "What does RAG mean?" \
|
||||
--iterations 10 \
|
||||
--concurrency 8 \
|
||||
--teardown
|
||||
Reference in New Issue
Block a user