Skip to content

refactor into cmd/tpufbench and pkg/bench#24

Closed
jbowens wants to merge 8 commits intomainfrom
jackson/refacs
Closed

refactor into cmd/tpufbench and pkg/bench#24
jbowens wants to merge 8 commits intomainfrom
jackson/refacs

Conversation

@jbowens
Copy link

@jbowens jbowens commented Feb 12, 2026

Clean up and refactoring in preparation for new website benchmarks.

Add a go:generate directive so sqlc generate can be run with `go
generate ./...` and document the dependency.
Refactor the command-line flags for the root benchmark command into a
struct to tame them a bit, and switch to using cobra for command-line
flag management. In future work I intend to add 'preset' configurations
that canonicalize the benchmark configurations represented on the
website and these can live under their own subcommand.
Refactor the main benchmarking tool to move the command-line main
program under cmd/ alongside cmd/nightly, and move the bulk of the
benchmarking logic into a new pkg/bench package.

The pkg/bench package still logs to stdout as if it's a command-line, so
future work could clean that up.
@jbowens jbowens force-pushed the jackson/refacs branch 2 times, most recently from 5fb3442 to 5e4e160 Compare February 12, 2026 20:18
Sync README, CI, and go.mod to all declare go 1.25 as the Go major
version.

Use the (*WaitGroup).Go method, new in 1.25, to simplify a usage.
Previously there were two places where implemented iterating over
Cohere's Wikipedia embeddings: one in pkg/bench and one in cmd/nightly.
This commit moves the cmd/nightly implementation into pkg/bench,
replacing the more-limited (vector-only; no mmap-ing) implementation
there.
If the cache is already warm, the warm_cache endpoint returns a 409
Conflict indicating that the cache was already warm. Ignore this if the
benchmark encounters this (possible if reusing the upserted data from an
existing run).
Extract iteration over the cohere parquet files into a generic func that
returns an iterator over all the items across all files.
@jbowens
Copy link
Author

jbowens commented Feb 17, 2026

Closing in favor of a more complete wip rewrite.

@jbowens jbowens closed this Feb 17, 2026
@jbowens jbowens deleted the jackson/refacs branch February 17, 2026 21:47
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

Comments