What k6 Does
- JavaScript scripting — ES6 modules for test logic
- Go runtime — high performance, low overhead
- Virtual Users — simulate concurrent users
- Scenarios — constant, ramping, arrival-rate
- Thresholds — pass/fail criteria for CI
- Checks — response assertions
- Metrics — request duration, throughput, errors
- Protocols — HTTP, WebSocket, gRPC, Redis
- Extensions — xk6 for custom protocols
- Output — JSON, CSV, Grafana Cloud, Prometheus, InfluxDB
Comparison
| Tool | Scripts | Runtime | Distributed |
|---|---|---|---|
| k6 | JavaScript | Go | k6-operator |
| Locust | Python | Python | Built-in |
| JMeter | XML/GUI | Java | Built-in |
| Gatling | Scala | JVM | Paid |
| Artillery | YAML/JS | Node.js | Paid |
FAQ
Q: Why not Node.js? A: k6's JS engine is goja, embedded in Go (not V8/Node). This keeps per-VU overhead small, letting a single machine simulate thousands of VUs.
Q: Grafana integration? A: Output to Prometheus Remote Write or Grafana Cloud k6, then view real-time load-testing metrics in a Grafana dashboard.
Sources
- Docs: https://grafana.com/docs/k6
- GitHub: https://github.com/grafana/k6
- License: AGPL 3.0