Performance testing suite for the GitHub REST API using k6, Grafana and GitHub Actions.
| Script | Type | VUs | Description |
|---|---|---|---|
search-repos.js |
Load Test | 2 | Repository search under sustained load |
list-issues.js |
Load Test | 5 | Issue listing across popular repos |
traffic-spike.js |
Spike Test | 2→8→2 | Traffic burst simulation with recovery |
| Metric | Threshold |
|---|---|
http_req_duration |
p(95) < 3000ms |
http_req_failed |
rate < 5% |
k6 run -e GITHUB_TOKEN=your_token tests/search-repos.js
k6 run -e GITHUB_TOKEN=your_token tests/list-issues.js
k6 run -e GITHUB_TOKEN=your_token tests/traffic-spike.js# Start InfluxDB and Grafana
docker compose up -d
# Run tests sending metrics to InfluxDB
k6 run -e GITHUB_TOKEN=your_token --out influxdb=http://localhost:8086/k6 tests/search-repos.jsOpen Grafana at http://localhost:3001 (user: admin, password: admin)
Import grafana/dashboard.json to visualize results.
k6-github-api-performance/
├── .github/
│ └── workflows/
│ └── performance.yml
├── config/
│ └── thresholds.js
├── grafana/
│ └── dashboard.json
├── tests/
│ ├── search-repos.js
│ ├── list-issues.js
│ └── traffic-spike.js
├── .gitignore
├── docker-compose.yml
└── README.md
- k6 — Performance testing engine
- JavaScript — Test scripting
- GitHub Actions — CI/CD automation
- Grafana — Metrics visualization
- InfluxDB — Metrics storage
- Docker — Container orchestration