Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: create cargo-paradedb for easy dev script execution #1028

Merged
merged 19 commits into from
Apr 18, 2024

Conversation

neilyio
Copy link
Contributor

@neilyio neilyio commented Apr 1, 2024

Ticket(s) Closed

What

To facilitate tasks like setting up benchmarks in CI/EC2 instances, I've made a Rust CLI that can optionally be installed globally.

Why

As we start to require more sophisticated testing and benchmark environments, we'll want reproducible scripts that can generate/process data and run tasks.

We can use Cargo's wonderful install feature to install all our tools and dependencies at once in any environment. For many tasks in containers/instances, this will be the only setup command we'll need:

cargo install --git https://github.com/paradedb/paradedb.git cargo-paradedb

How

By the magic of clap, Rust's de-facto CLI builder, and cmd_lib, which has a brilliant syntax for running subprocesses.

Tests

Ideally, we'd have a suite that tests all this scripts, probably in isolated docker environments with testcontainers. But we can save that for when our tasks become more complex and more frequently run.

@neilyio neilyio force-pushed the neil/cargo-paradedb branch 2 times, most recently from 9b8671c to 9b1711c Compare April 15, 2024 17:39
@neilyio neilyio marked this pull request as ready for review April 15, 2024 20:49
Copy link
Collaborator

@philippemnoel philippemnoel left a comment

Choose a reason for hiding this comment

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

Let's just add the results to pg_search/benchmarks/README.md and to pg_analytics/benchmarks/README.md and it'll be good to go for me. Thank you for doing this!

proper install

add url install docs

Add corpus function

Add generate corpus function

Fix workspace formatting

Remove testcontainers

Prettier

Remove tryfrom

Readme wording

Readme wording

Readme heading

Parametrize events

add repeat arg

add seed arg

add insert command

setup tracing

add postgres insert methods

fix types

finish bench generate

fix comment

update index debug

update index debug

update index debug again

remove logging

namespace corpus

build index + print
@neilyio neilyio merged commit 804f130 into dev Apr 18, 2024
11 checks passed
@neilyio neilyio deleted the neil/cargo-paradedb branch April 18, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants