Velcom 2.0 written in Rust
Find a file
2023-08-14 16:31:44 +02:00
.sqlx Include worker name and info in run 2023-08-14 14:26:53 +02:00
.vscode Fix VSCode config and dev instructions 2023-08-05 23:01:29 +02:00
meta Update and document scripts 2023-08-05 19:42:59 +02:00
migrations Include worker name and info in run 2023-08-14 14:26:53 +02:00
scripts Port queue page 2023-08-14 12:23:22 +02:00
src Use RFC 3339 dates in worker endpoint 2023-08-14 16:31:44 +02:00
static Rename runners to workers 2023-08-11 02:12:38 +02:00
templates Implement queue task deletion 2023-08-14 12:41:47 +02:00
.env Fix project not compiling without dev.db 2023-08-05 16:20:32 +02:00
.gitignore Create project 2023-08-03 14:32:37 +02:00
askama.toml Use askama to render test template 2023-08-03 19:14:58 +02:00
build.rs Include hash of static files in paths 2023-08-14 01:35:52 +02:00
Cargo.lock Use advance() instead of split_to() 2023-08-14 14:01:34 +02:00
Cargo.toml Use advance() instead of split_to() 2023-08-14 14:01:34 +02:00
DESIGN.md Stream repo and bench repo worktree tars 2023-08-11 14:42:39 +02:00
README.md Write down more design notes 2023-08-08 02:43:24 +02:00
tsconfig.json Fix build script not using $OUT_PATH 2023-08-07 02:21:32 +02:00

tablejohn

Run benchmarks against commits in a git repo and present their results.

Building from source

The following tools are required:

Once you have installed these tools, run the following command to install or update tablejohn to ~/.cargo/bin/tablejohn:

cargo install --force --git https://github.com/Garmelon/tablejohn

Alternatively, clone the repo and run cargo build --release. The compiled binary will be located at target/release/tablejohn.

The binary produced by either of these steps contains everything needed to run tablejohn. Not additional files are required.

Developing

I recommend using VSCode and rust-analyzer in combination with the tools mentioned in the previous section. However, some parts of the code base require additional tools and setup.

Changing SQL queries with sqlx

If you want to change any of the SQL queries, you will need to install sqlx, the CLI of the sqlx library. The sqlx library can connect to a dev database at compile-time to verify SQL queries defined via the query* macro family. This is useful during development as it gives immediate feedback on mistakes in your queries. However, it requires a bit of setup. During normal compilation with cargo build, the cached query analyses in .sqlite/ are used instead of the dev database. This way, the dev database and sqlx tool is not required when you're just building the project.

First, run ./meta/setup. This creates or updates the dev database at target/dev.db. You will need to rerun this command whenever you change or add a migration.

Then, if you don't use VSCode, configure your rust-analyzer to run with the with the environment variable SQLX_OFFLINE=false using the rust-analyzer.server.extraEnv option. This signals to sqlx that it should use the dev database instead of .sqlx/, but only in your IDE.

Important: Before committing any changed SQL query, you must run ./meta/update_sqlx_queries. This will recreate your dev database (just like ./meta/setup) and then update the files in .sqlx/.