Load Rift is a local desktop
path from a Postman collection to
a k6 load test.
It is not a hosted test
service. The user imports a collection,
configures traffic, runs k6 on the
machine, watches live metrics, and exports
an HTML report.
First, look at the shape of
the repository. The frontend is React
and Vite under src.
The backend is Tauri and Rust
under src-tauri. The bridge between them
is the LoadRiftApi contract in src/lib/loadrift/api.ts.
That contract keeps the UI away
from raw Tauri calls.
The main workflow starts in src/app/App.tsx.
It composes import state, runner options,
config validation, smoke testing, and live
run state. The visible product flow
is simple. Step one imports the
collection. Step two configures the run.
Step three runs k6 and reviews
the result. Collection import starts with
a file picker in the frontend.
The Tauri command import_collection_from_file reads the
JSON file. The parser in src-tauri/src/importing/parser.rs
extracts folders, requests, variables, headers, URLs,
and bodies. It also builds stable
request IDs from request fingerprints.
After import, Load Rift generates a
k6 script. That happens in src-tauri/src/importing/script.rs.
The generated script embeds collection variables
and request definitions.
It also reads runtime settings from
environment variables. That is how the
UI controls k6 without rewriting source
files during a run.
Request selection is a separate feature.
The collection summary model builds folder
and request rows.
Users can search, filter by method,
collapse folders, and select visible requests.
Sequential mode runs each selected request
per iteration. Weighted mode builds a
deterministic schedule. A weight of zero
keeps the request visible but excludes
it from the weighted runtime pool.
Before a full load test, the
smoke test path can run the
selected requests once.
It uses reqwest in src-tauri/src/commands/testing/smoke.rs.
The limits are deliberate.
At most twenty five requests run,
each request has a thirty second
timeout, and the whole smoke test
has a two minute deadline.
Starting k6 moves into the runtime
system. src-tauri/src/k6/process/runtime.rs resolves the k6 binary,
writes private artifacts, spawns the process,
and starts output forwarders.
It checks LOADRIFT_K6_BIN first, then bundled
resources, local paths, and PATH.
That makes packaged apps self-contained while
still allowing developer overrides.
Live monitoring comes from two streams.
Plain output arrives as k6:output.
JSON metric lines feed LiveMetricsAggregator in
src-tauri/src/k6/process/live_metrics.rs. The frontend hook useTestHarness filters
events by run ID, so stale
events do not overwrite the active
run. When k6 exits, Load Rift
reads summary.json. src-tauri/src/k6/summary.rs turns the summary
into final metrics, thresholds, and result
status. If the summary is missing
or unsupported, the app falls back
to the latest live metrics and
records a summary issue.
That is why a runtime failure
should not look like a clean
success. Report export is local too.
src-tauri/src/k6/report.rs writes an HTML report with
overview cards, threshold results, structured metrics,
raw summary JSON, and the final
console summary. The report uses the
latest retained run result in backend
state. Packaging is part of the
architecture. scripts/install-k6.sh downloads the bundled k6
binary with checksum checks.
src-tauri/tauri.conf.json includes the binary directory and
license files in desktop bundles.
The release workflow builds Linux and
macOS artifacts, signs macOS binaries, and
builds the signed APT repository.
The security model is practical and
local. Auth tokens are not stored
in runner preferences.
Pasted cURL input is cleared after
extracting base URL or bearer token.
Generated k6 artifacts use private permissions.
Debug preservation is opt-in with LOADRIFT_PRESERVE_K6_ARTIFACTS
because artifacts can contain URLs, headers,
bodies, and tokens.
By the numbers, this is a
compact but Rust-heavy project.
The scanned source has about nine
thousand two hundred Rust lines, four
thousand four hundred TSX lines, and
two thousand five hundred TypeScript lines.
The largest file is the k6
runtime. The busiest churn is around
Tauri packaging, dependencies, release workflow, and
app styling. You can remember Load
Rift as three layers.
React owns the workspace.
Tauri commands own trusted state transitions.
The k6 runtime owns local process
execution and artifact safety.
Together they turn a Postman collection
into a local, inspectable load test.