WEBVTT 1 00:00:00.000 --> 00:00:02.629 Load Rift is a local desktop 2 00:00:02.659 --> 00:00:05.288 path from a Postman collection to 3 00:00:05.318 --> 00:00:07.070 a k6 load test. 4 00:00:07.100 --> 00:00:09.729 It is not a hosted test 5 00:00:09.759 --> 00:00:12.388 service. The user imports a collection, 6 00:00:12.418 --> 00:00:15.046 configures traffic, runs k6 on the 7 00:00:15.076 --> 00:00:17.705 machine, watches live metrics, and exports 8 00:00:17.735 --> 00:00:19.050 an HTML report. 9 00:00:19.080 --> 00:00:21.708 First, look at the shape of 10 00:00:21.738 --> 00:00:24.367 the repository. The frontend is React 11 00:00:24.397 --> 00:00:26.150 and Vite under src. 12 00:00:26.180 --> 00:00:28.809 The backend is Tauri and Rust 13 00:00:28.839 --> 00:00:31.467 under src-tauri. The bridge between them 14 00:00:31.497 --> 00:00:34.126 is the LoadRiftApi contract in src/lib/loadrift/api.ts. 15 00:00:34.156 --> 00:00:36.785 That contract keeps the UI away 16 00:00:36.815 --> 00:00:38.567 from raw Tauri calls. 17 00:00:38.597 --> 00:00:41.226 The main workflow starts in src/app/App.tsx. 18 00:00:41.256 --> 00:00:43.885 It composes import state, runner options, 19 00:00:43.915 --> 00:00:46.544 config validation, smoke testing, and live 20 00:00:46.574 --> 00:00:49.203 run state. The visible product flow 21 00:00:49.233 --> 00:00:51.861 is simple. Step one imports the 22 00:00:51.891 --> 00:00:54.520 collection. Step two configures the run. 23 00:00:54.550 --> 00:00:57.179 Step three runs k6 and reviews 24 00:00:57.209 --> 00:00:59.838 the result. Collection import starts with 25 00:00:59.868 --> 00:01:02.497 a file picker in the frontend. 26 00:01:02.527 --> 00:01:05.155 The Tauri command import_collection_from_file reads the 27 00:01:05.185 --> 00:01:07.814 JSON file. The parser in src-tauri/src/importing/parser.rs 28 00:01:07.844 --> 00:01:10.473 extracts folders, requests, variables, headers, URLs, 29 00:01:10.503 --> 00:01:13.132 and bodies. It also builds stable 30 00:01:13.162 --> 00:01:15.352 request IDs from request fingerprints. 31 00:01:15.382 --> 00:01:18.011 After import, Load Rift generates a 32 00:01:18.041 --> 00:01:20.670 k6 script. That happens in src-tauri/src/importing/script.rs. 33 00:01:20.700 --> 00:01:23.329 The generated script embeds collection variables 34 00:01:23.359 --> 00:01:24.673 and request definitions. 35 00:01:24.703 --> 00:01:27.332 It also reads runtime settings from 36 00:01:27.362 --> 00:01:29.991 environment variables. That is how the 37 00:01:30.021 --> 00:01:32.649 UI controls k6 without rewriting source 38 00:01:32.679 --> 00:01:34.432 files during a run. 39 00:01:34.462 --> 00:01:37.091 Request selection is a separate feature. 40 00:01:37.121 --> 00:01:39.750 The collection summary model builds folder 41 00:01:39.780 --> 00:01:41.094 and request rows. 42 00:01:41.124 --> 00:01:43.753 Users can search, filter by method, 43 00:01:43.783 --> 00:01:46.412 collapse folders, and select visible requests. 44 00:01:46.442 --> 00:01:49.070 Sequential mode runs each selected request 45 00:01:49.100 --> 00:01:51.729 per iteration. Weighted mode builds a 46 00:01:51.759 --> 00:01:54.388 deterministic schedule. A weight of zero 47 00:01:54.418 --> 00:01:57.047 keeps the request visible but excludes 48 00:01:57.077 --> 00:01:59.705 it from the weighted runtime pool. 49 00:01:59.735 --> 00:02:02.364 Before a full load test, the 50 00:02:02.394 --> 00:02:05.023 smoke test path can run the 51 00:02:05.053 --> 00:02:06.367 selected requests once. 52 00:02:06.397 --> 00:02:08.588 It uses reqwest in src-tauri/src/commands/testing/smoke.rs. 53 00:02:08.618 --> 00:02:10.371 The limits are deliberate. 54 00:02:10.401 --> 00:02:13.029 At most twenty five requests run, 55 00:02:13.059 --> 00:02:15.688 each request has a thirty second 56 00:02:15.718 --> 00:02:18.347 timeout, and the whole smoke test 57 00:02:18.377 --> 00:02:20.568 has a two minute deadline. 58 00:02:20.598 --> 00:02:23.226 Starting k6 moves into the runtime 59 00:02:23.256 --> 00:02:25.885 system. src-tauri/src/k6/process/runtime.rs resolves the k6 binary, 60 00:02:25.915 --> 00:02:28.544 writes private artifacts, spawns the process, 61 00:02:28.574 --> 00:02:30.327 and starts output forwarders. 62 00:02:30.357 --> 00:02:32.985 It checks LOADRIFT_K6_BIN first, then bundled 63 00:02:33.015 --> 00:02:35.206 resources, local paths, and PATH. 64 00:02:35.236 --> 00:02:37.865 That makes packaged apps self-contained while 65 00:02:37.895 --> 00:02:39.647 still allowing developer overrides. 66 00:02:39.677 --> 00:02:42.306 Live monitoring comes from two streams. 67 00:02:42.336 --> 00:02:44.527 Plain output arrives as k6:output. 68 00:02:44.557 --> 00:02:47.186 JSON metric lines feed LiveMetricsAggregator in 69 00:02:47.216 --> 00:02:49.844 src-tauri/src/k6/process/live_metrics.rs. The frontend hook useTestHarness filters 70 00:02:49.874 --> 00:02:52.503 events by run ID, so stale 71 00:02:52.533 --> 00:02:55.162 events do not overwrite the active 72 00:02:55.192 --> 00:02:57.821 run. When k6 exits, Load Rift 73 00:02:57.851 --> 00:03:00.479 reads summary.json. src-tauri/src/k6/summary.rs turns the summary 74 00:03:00.509 --> 00:03:03.138 into final metrics, thresholds, and result 75 00:03:03.168 --> 00:03:05.797 status. If the summary is missing 76 00:03:05.827 --> 00:03:08.456 or unsupported, the app falls back 77 00:03:08.486 --> 00:03:11.115 to the latest live metrics and 78 00:03:11.145 --> 00:03:12.897 records a summary issue. 79 00:03:12.927 --> 00:03:15.556 That is why a runtime failure 80 00:03:15.586 --> 00:03:18.215 should not look like a clean 81 00:03:18.245 --> 00:03:20.873 success. Report export is local too. 82 00:03:20.903 --> 00:03:23.532 src-tauri/src/k6/report.rs writes an HTML report with 83 00:03:23.562 --> 00:03:26.191 overview cards, threshold results, structured metrics, 84 00:03:26.221 --> 00:03:28.850 raw summary JSON, and the final 85 00:03:28.880 --> 00:03:31.509 console summary. The report uses the 86 00:03:31.539 --> 00:03:34.167 latest retained run result in backend 87 00:03:34.197 --> 00:03:36.826 state. Packaging is part of the 88 00:03:36.856 --> 00:03:39.485 architecture. scripts/install-k6.sh downloads the bundled k6 89 00:03:39.515 --> 00:03:41.268 binary with checksum checks. 90 00:03:41.298 --> 00:03:43.926 src-tauri/tauri.conf.json includes the binary directory and 91 00:03:43.956 --> 00:03:46.147 license files in desktop bundles. 92 00:03:46.177 --> 00:03:48.806 The release workflow builds Linux and 93 00:03:48.836 --> 00:03:51.465 macOS artifacts, signs macOS binaries, and 94 00:03:51.495 --> 00:03:53.685 builds the signed APT repository. 95 00:03:53.715 --> 00:03:56.344 The security model is practical and 96 00:03:56.374 --> 00:03:59.003 local. Auth tokens are not stored 97 00:03:59.033 --> 00:04:00.347 in runner preferences. 98 00:04:00.377 --> 00:04:03.006 Pasted cURL input is cleared after 99 00:04:03.036 --> 00:04:05.665 extracting base URL or bearer token. 100 00:04:05.695 --> 00:04:08.324 Generated k6 artifacts use private permissions. 101 00:04:08.354 --> 00:04:10.982 Debug preservation is opt-in with LOADRIFT_PRESERVE_K6_ARTIFACTS 102 00:04:11.012 --> 00:04:13.641 because artifacts can contain URLs, headers, 103 00:04:13.671 --> 00:04:14.986 bodies, and tokens. 104 00:04:15.016 --> 00:04:17.644 By the numbers, this is a 105 00:04:17.674 --> 00:04:19.427 compact but Rust-heavy project. 106 00:04:19.457 --> 00:04:22.086 The scanned source has about nine 107 00:04:22.116 --> 00:04:24.744 thousand two hundred Rust lines, four 108 00:04:24.774 --> 00:04:27.403 thousand four hundred TSX lines, and 109 00:04:27.433 --> 00:04:30.062 two thousand five hundred TypeScript lines. 110 00:04:30.092 --> 00:04:32.721 The largest file is the k6 111 00:04:32.751 --> 00:04:35.380 runtime. The busiest churn is around 112 00:04:35.410 --> 00:04:38.038 Tauri packaging, dependencies, release workflow, and 113 00:04:38.068 --> 00:04:40.697 app styling. You can remember Load 114 00:04:40.727 --> 00:04:42.480 Rift as three layers. 115 00:04:42.510 --> 00:04:44.262 React owns the workspace. 116 00:04:44.292 --> 00:04:46.921 Tauri commands own trusted state transitions. 117 00:04:46.951 --> 00:04:49.580 The k6 runtime owns local process 118 00:04:49.610 --> 00:04:51.362 execution and artifact safety. 119 00:04:51.392 --> 00:04:53.110 Together they turn a Postman collection 120 00:04:53.140 --> 00:04:54.140 into a local, inspectable load test.