Skip to content

Split ann_benchmark.go into focused files#99

Open
rlmanrique wants to merge 2 commits into
mainfrom
refactor/split-ann-benchmark
Open

Split ann_benchmark.go into focused files#99
rlmanrique wants to merge 2 commits into
mainfrom
refactor/split-ann-benchmark

Conversation

@rlmanrique
Copy link
Copy Markdown
Contributor

The original file was ~1274 lines handling schema creation, compression, multi-tenancy, async indexing, query execution, and CLI wiring all in one place. Split into four files with clear single responsibilities:

  • ann_schema.go — schema CRUD, updateEf, tenant management, deletes
  • ann_ingest.go — CompressionType/Batch types, createClient, writeChunk, waitReady, enableCompression
  • ann_query.go — parseEfValues, runQueries, shouldStopRunQueries,
    benchmarkANN/Duration, median/sampledResults
  • ann_benchmark.go — ResultsJSONBenchmark, uuidFromInt/intFromUUID,
    cobra command + flag registration only

All existing unit tests and integration tests continue to pass.

The original file was ~1274 lines handling schema creation, compression,
multi-tenancy, async indexing, query execution, and CLI wiring all in one
place. Split into four files with clear single responsibilities:

- ann_schema.go  — schema CRUD, updateEf, tenant management, deletes
- ann_ingest.go  — CompressionType/Batch types, createClient, writeChunk,
                   waitReady, enableCompression
- ann_query.go   — parseEfValues, runQueries, shouldStopRunQueries,
                   benchmarkANN/Duration, median/sampledResults
- ann_benchmark.go — ResultsJSONBenchmark, uuidFromInt/intFromUUID,
                     cobra command + flag registration only

All existing unit tests and integration tests continue to pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@orca-security-eu orca-security-eu Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 3   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca
🛡️ The following SAST misconfigurations have been detected
NAME FILE
medium Avoid Using `math/rand` for Cryptographic Operations in Go ...ker/cmd/ann_query.go View in code
medium Directory Permissions Are Set to Overly Permissive Values ...ker/cmd/ann_query.go View in code
medium Overly Permissive File Permissions Set in Application ...ker/cmd/ann_query.go View in code

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.

1 participant