Project
Performance Regression Gate
Performance testing project that compares a normal scenario with a degraded one and uses k6 as a quality gate. The public demo presents both scenarios and links to the real executions performed in GitHub Actions.
Overview
Performance QA project built with FastAPI and k6 that detects regressions through automated thresholds and integration with Docker and GitHub Actions.
Stack: Python 3.13, FastAPI, k6, Docker, Docker Compose, GitHub Actions, GitHub Pages, HTML, CSS, JavaScript
What it does
An application can remain functionally correct while suffering a significant performance regression. The project reproduces that situation in a controlled way and automatically verifies whether latency, HTTP failure rate and checks remain within the defined limits.
How it is built
The system under test is built with FastAPI and exposes a /work endpoint that can run in normal or degraded mode. The degraded mode introduces approximately one second of artificial latency. k6 sends the requests and applies three thresholds: p95 below 500 ms, HTTP failure rate below 1%, and more than 99% successful checks. The service runs reproducibly with Docker and Docker Compose.
What it validates or automates
GitHub Actions builds and starts the API with Docker Compose, waits until the /health endpoint is available, installs k6 and runs the selected scenario. In the normal execution, p95 was 2.03 ms and the quality gate finished with PASS. In the degraded scenario, responses continued to return HTTP 200 and checks remained at 100%, but p95 reached approximately one second and the pipeline finished with FAIL after crossing the latency threshold.
Key points
- Quality gate with thresholds for p95 latency, HTTP failure rate and percentage of successful checks.
- Controlled degraded scenario showing that an application can continue returning HTTP 200 while still failing because of a performance regression.
- Reproducible Docker Compose environment, automated GitHub Actions execution and a public demo deployed with GitHub Pages.