Repository navigation
nextship-loadtest: a separate command that load tests any site with k6 - #8
Open
gowtham472 wants to merge 2 commits into
Open
gowtham472 wants to merge 2 commits into
gowtham472 wants to merge 2 commits into
Conversation
nextship-loadtest takes an address and reports how many users at once the site holds. It writes the k6 script, runs k6 from PATH or from the official Docker image, and reads the summary back: up to five rising steps, each held when at most 1% of its requests fail and 95% finish within a second. It prints its plan and sends nothing until --yes, and a target that never answers is an error rather than a result. In its own package with no dependency on the CLI, so it can be used without nextship. Not published. 39 unit tests, and an end-to-end script that passes with k6 2.3.0 on PATH and that CI runs with Docker and with k6 on PATH.
scripts/e2e.mjs docker passes with Docker Desktop (Docker 29.7.2) on Windows, with the server on the same machine requested as host.docker.internal. macOS is the one path still not run.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
nextship | 3346fbd | Commit Preview URL Branch Preview URL |
Oct 09 2026, 03:45 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A separate command,
nextship-loadtest, that reports how many users at once a site holds. Asked for by a reader on r/nextjs who wanted to know what an app can take before deploying it.What it does
grafana/k6:2.3.0), and reads the summary back. k6 is run as a separate process and never bundled.--yes. At most 1000 users and 600 s. An address carrying credentials is refused.packages/loadtest, with no dependency on the CLI in either direction, so it works on any site without nextship. Marked private: nothing here publishes it.How it was verified
packages/loadtest/scripts/e2e.mjs, 7 of 7 checks against a server that answers one request at a time, in each of these:host.docker.internalLoad test commandCI job, which passed on this pull requestNot yet verified
Publishing, the npm name and a site page are in
docs/roadmap.md. Design record:docs/design.md§15.🤖 Generated with Claude Code