• Rust 71.4%
  • HTML 23.7%
  • Python 4.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Rimvydas Zilinskas 5d8c48b319
All checks were successful
Release / version (push) Successful in 2s
Release / build (gcc-aarch64-linux-gnu libc6-dev-arm64-cross, aarch64-linux-gnu-gcc, aarch64-unknown-linux-gnu) (push) Successful in 2m18s
coverage 69.43% of lines
CI / check (push) Successful in 3m1s
Release / build (x86_64-unknown-linux-gnu) (push) Successful in 1m9s
Release / publish (push) Successful in 10s
fix: update tests for redirect to /events
2026-10-02 10:23:06 +02:00
.cargo chore: prepare sqlx queries 2026-09-22 16:44:30 +02:00
.forgejo feat: bake in version numbers into release artifacts 2026-09-30 16:18:10 +02:00
.sqlx feat: update frontend to include field management for expectations 2026-10-02 10:10:13 +02:00
fixtures feat: store event body data and extract fields 2026-09-28 21:55:59 +02:00
migrations feat: add expectation fields implementation on event ingestion 2026-10-02 09:45:19 +02:00
src fix: redirect to events instead of root path after environment creation or switch 2026-10-02 10:13:35 +02:00
templates feat: update frontend to include field management for expectations 2026-10-02 10:10:13 +02:00
tests fix: update tests for redirect to /events 2026-10-02 10:23:06 +02:00
www feat: add environment creation page 2026-09-24 21:06:14 +02:00
.env.example feat: add release workflow 2026-09-22 17:31:30 +02:00
.gitignore feat: add test coverage 2026-09-21 13:11:06 +02:00
build.rs feat: bake in version numbers into release artifacts 2026-09-30 16:18:10 +02:00
Cargo.lock feat: validate event type slug using regex 2026-09-29 20:19:01 +02:00
Cargo.toml feat: validate event type slug using regex 2026-09-29 20:19:01 +02:00
docker-compose.yml feat: add slap, split into modules, add pulse_cli bin, add docker compose 2026-09-15 16:59:40 +02:00
README.md feat: store event body data and extract fields 2026-09-28 21:55:59 +02:00

Pulse - monitor system health

Local setup

Prerequisites:

  • Cargo installed
  • Docker installed

After cloning the repository copy the .env.example file and adjust the values accordingly.

Then to run the application in development:

# Start up the database
docker compose up -d
# Migrate the database first
cargo run -- migrate
# Run the actual web server
cargo run -- run

By default, it will run the default backend binary.

To run the cli binary:

cargo run --bin pulse_cli

Migrations

To work with migrations it is useful to have the sqlx CLI installed:

cargo install sqlx-cli --no-default-features --features postgres

Then you can run:

sqlx migrate add <name>

# For reversible migrations

sqlx migrate add <name> --reversible

For better experience always prefer adding reversible migrations.

Before commiting, prepare offline queries:

cargo sqlx prepare -- --all-targets --all-features

Code hygiene

Before pushing run formatting and clippy to ensure code quality is up:

cargo fmt --all
cargo clippy --all-targets --all-features --fix --lib --allow-dirty
cargo prep-sql

Test coverage

Coverage is measured with cargo-llvm-cov (LLVM source-based instrumentation). One-time setup:

rustup component add llvm-tools-preview
cargo install cargo-llvm-cov

The test suite uses #[sqlx::test], which creates a throwaway database per test, so it needs a live Postgres. Tests do not load .env (dotenv is only called by the server binary), so export the URL yourself — and note it must include the /pulse database path segment, which the value in .env.example omits:

docker compose up -d
export DATABASE_URL=postgresql://pulse:pulse@localhost:5432/pulse

Then:

cargo cov       # writes lcov.info at the repo root (for editors)
cargo cov-html  # renders target/llvm-cov/html and opens it in a browser
cargo cov-text  # per-file summary table in the terminal

VSCode

Install the Coverage Gutters extension (ryanluker.vscode-coverage-gutters), run cargo cov, then run Coverage Gutters: Watch from the command palette. It picks up lcov.info from the workspace root with no further configuration.

RustRover

Run cargo cov, then Run | Manage Coverage Reports… (Ctrl+Alt+F6) → Add and select lcov.info to display it in the Coverage tool window. Recent RustRover builds can also instrument directly: More Actions → Run with Coverage on the cargo test run configuration. If neither works on your version, cargo cov-html is always available.

CI

Every CI run prints a per-file coverage summary in the job summary and uploads a coverage artifact containing lcov.info plus the browsable HTML report. Coverage is reported only — it never fails the build.