Add TreeDB vector search profiling hook - #2330
Conversation
|
Warning Review limit reached
More reviews will be available in 56 minutes and 31 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
-search-profile-dirflag totreedb_vector_search_demofor column_graph search runscpu,heap,allocs,block, andmutexprofiles with thesearch_<mode>_c<N>_*.pprofprefixTREEDB_SEARCH_PROFILE_DIRpassthrough toscripts/bench_vector_db_compare.sh, using backend-specific subdirectories to avoid overwritesValidation
GOWORK=off go test -count=1 ./cmd/treedb_vector_search_demobash -n scripts/bench_vector_db_compare.shgit diff --checkTREEDB_SEARCH_PROFILE_DIRset:BACKENDS=treedb_column_graph_quantized_rerank DOCS=64 DIMS=8 QUERIES=4 VALIDATE_QUERIES=0 VALIDATE_DOCS=0 TOP_K=3 SEARCH_CONCURRENCY=1,2 M=4 EF_CONSTRUCTION=32 EF_SEARCH=32 MIN_RECALL=0 TREEDB_QUANTIZED_RERANK_MIN_RECALL=0 TREEDB_SEARCH_PROFILE_DIR=/tmp/vector_db_profile_script_smoke_20260604_143430/profiles RUN_DIR=/tmp/vector_db_profile_script_smoke_20260604_143430 GOWORK=off scripts/bench_vector_db_compare.sh/tmp/vector_db_profile_script_smoke_20260604_143430/profiles/treedb_column_graph_quantized_reranksearch_profile_dirpoints at that backend-specific profile directoryProfiling Notes
This PR adds the hook needed for repeatable profiling; it does not claim profiled timings as comparison numbers. CPU profiles are scoped to the measured search loop. Heap, allocation, block, and mutex profiles are supporting runtime snapshots and may include process state beyond the search loop. Enabling profiles changes latency and throughput, so unprofiled runs should remain the source for published benchmark numbers.
In the c=1/c=8 quantized_rerank investigation that motivated this, the c=8 CPU profile on the post-traversal artifact run pointed primarily at scalar_u8 indexed dot scoring,
SearchCosine, scratch clearing, top-candidate insertion, and quantized scorer traversal work, with exact rerank scoring a smaller contributor.