Repository navigation
feat: export k6 latency percentiles as JSON summaries (#36) - #52
Merged
yashdotdev13 merged 1 commit intoOct 19, 2026
Merged
yashdotdev13 merged 1 commit into
yashdotdev13 merged 1 commit into
Conversation
Benchmark runs could only be compared by scraping k6 console output. Both k6 scenarios now report p50/p90/p95/p99 via a shared summaryTrendStats setting and use a shared handleSummary that prints a short console summary and writes k6-summary-<scenario>-<timestamp>.json with the scenario, run parameters, latency, throughput, HTTP failure and check rates, threshold results and raw metric values. Existing requests, checks and thresholds are unchanged. The benchmark report documents how to compare runs and interpret results per environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.



Summary
Make k6 benchmark runs comparable without scraping console output: both scenarios now report p50/p90/p95/p99 and write a machine-readable JSON summary per run.
Related issue
Closes #36
Type of change
What changed
load-tests/lib/summary.js, a shared k6 summary handler. It sets the trend stats (avg, min, p50, p90, p95, p99, max), prints a short console summary, and writesk6-summary-<scenario>-<timestamp>.jsoncontaining the scenario, the run parameters (script options and target URLs), latency percentiles, throughput, HTTP failure rate, check pass rate, each threshold with its pass/fail result, and the raw values of every k6 metric (including the distributed scenario's custom gateway and decision metrics).load-tests/baseline.jsandload-tests/distributed.jsuse the shared handler. Their requests, checks and thresholds are unchanged.docs/benchmark-and-validation.mddocuments the artifact, how to compare two runs, and how to interpret results per environment (HTTP failures vsREJECTEDdecisions, Redis state, tail-latency sensitivity).Note: because the scripts define
handleSummary, k6's default end-of-test summary is replaced by the shorter custom one. Scripts must be run from a file path (notk6 run -) so the shared module resolves.Validation
node --checkon the three k6 scriptsbaseline.jsanddistributed.jsagainst the Docker Compose stack./mvnw -B verify: no Java changes in this PR; integration suite to be run with DockerDistributed-systems impact
None on runtime behaviour. Only the load-test scripts and documentation change; no gateway, Redis, lease or metric code is touched.
🤖 Generated with Claude Code