Skip to content

feat(bench): support xvec and zvec backends - #21

Merged
zhenghaoz merged 2 commits into
mainfrom
feat/vector-db-bench-zvec
Aug 12, 2026
Merged

feat(bench): support xvec and zvec backends#21
zhenghaoz merged 2 commits into
mainfrom
feat/vector-db-bench-zvec

Conversation

@zhangzhenghao

Copy link
Copy Markdown
Collaborator

Summary

  • require an xvec or zvec backend argument and dispatch loading/searching to the selected implementation
  • add a zvec-go backend for collection creation, batch insertion, optimization, and concurrent/serial HNSW queries
  • include the backend and backend-specific label in JSON reports
  • update the benchmark guide with the requested xvec command and an equivalent zvec-go command
  • keep normal CGO builds lightweight through an explicit stub; build with CGO_ENABLED=0 to produce one binary supporting both backends

Verification

  • go test ./... -count=1
  • go vet ./...
  • CGO_ENABLED=0 go vet ./cmd/vector-db-bench
  • CGO_ENABLED=0 go test ./cmd/vector-db-bench -count=1 with ZVEC_LIBRARY_PATH pointing to the official zvec-go v0.6.0 Linux x86-64 C API library
  • real custom Parquet end-to-end load, optimize, concurrent search, serial search, and Recall@1 checks passed for both xvec and zvec
  • requested Cohere 1M xvec and zvec command lines validated with --dry-run

The full 1M dataset benchmark was not run locally because it downloads roughly 3.1 GB of training data and is the workload this command is intended to launch.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.72727% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.35%. Comparing base (c8e0544) to head (d11c826).

Files with missing lines Patch % Lines
cmd/vector-db-bench/benchmark.go 78.57% 2 Missing and 1 partial ⚠️
cmd/vector-db-bench/config.go 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
- Coverage   61.35%   61.35%   -0.01%     
==========================================
  Files         147      149       +2     
  Lines       40203    40240      +37     
==========================================
+ Hits        24668    24689      +21     
- Misses      12322    12340      +18     
+ Partials     3213     3211       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zhenghaoz
zhenghaoz merged commit 94d233b into main Aug 12, 2026
7 checks passed
@zhenghaoz
zhenghaoz deleted the feat/vector-db-bench-zvec branch August 12, 2026 00:43
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.

2 participants