Understanding k6 results
As k6 runs your test, it collects performance metrics about both the test execution and system behavior. Understanding these results helps you identify performance issues and validate that your application meets reliability goals.End-of-test summary
After your test completes, k6 prints a summary to the terminal with aggregated statistics for all metrics.Running a test
Run any k6 test to see the results:- Test progress: Real-time updates as the test runs
- Summary statistics: Aggregated metrics after completion
- Check results: Pass/fail rates for validations
- Threshold results: Whether performance goals were met
Example output
The ✓ symbol indicates passing checks or thresholds, while ✗ indicates failures.
Built-in metrics
k6 automatically collects these metrics for every test:HTTP metrics
- Request Timing
- Connection
- Success & Volume
http_req_duration- Description: Total time for the request (sending + waiting + receiving)
- Type: Trend
- Key metric: This is your primary latency metric
- What to look for: p(95) and p(99) values under your target (e.g., < 500ms)
http_req_waiting- Description: Time spent waiting for response (server processing time)
- Type: Trend
- What to look for: High values indicate slow server processing
http_req_sending- Description: Time spent sending request data
- Type: Trend
- What to look for: High values may indicate network issues
http_req_receiving- Description: Time spent receiving response data
- Type: Trend
- What to look for: High values for large responses are normal
Test execution metrics
iterations
- Description: Number of times the default function completed
- Type: Counter
- What to look for: Total test iterations and rate (iterations/s)
iteration_duration
- Description: Time to complete one iteration
- Type: Trend
- What to look for: Should include all requests + sleep time
vus
- Description: Number of active virtual users
- Type: Gauge
- What to look for: Current load level
vus_max
- Description: Maximum possible number of virtual users
- Type: Gauge
- What to look for: Allocated VU capacity
Understanding metric statistics
For Trend metrics (likehttp_req_duration), k6 reports several statistics:
Metric Statistics Explained
Metric Statistics Explained
avg - Average (mean) value
- Quick overview but can be misleading with outliers
- Best-case performance
- Middle value; more representative than average
- Worst-case performance
- 90% of requests were faster than this
- Common SLA target
- 95% of requests were faster than this
- Catches most outliers
- Important for user experience
- Only the worst 0.1% of requests exceed this
Configure summary statistics
Customize which statistics k6 displays:Checks and validations
Checks validate responses without stopping test execution. They appear in the summary as pass/fail rates:Checks don’t affect test execution. Use thresholds to fail tests based on performance criteria.
Thresholds for pass/fail criteria
Thresholds define performance requirements. If thresholds fail, k6 exits with a non-zero code:Custom metrics
Create metrics that track business-specific data:Exporting results
For detailed analysis, export metrics to external systems.JSON file
Export all metrics to a JSON file:CSV file
Export metrics to CSV format:Multiple outputs
Send results to multiple destinations:- InfluxDB
- Prometheus
- Cloud
- Other
Custom summary report
Create custom end-of-test reports usinghandleSummary():
- Terminal output (stdout)
- JSON summary file
- HTML report
Real-time results
Monitor test progress in real-time using the web dashboard:The web dashboard is built into k6 and requires no additional setup.
Analyzing results
When reviewing test results, focus on:1
Check error rate
Ensure
http_req_failed is below your acceptable threshold (typically < 1%).2
Review response times
Look at p95 and p99 of
http_req_duration. These represent user experience better than averages.3
Verify thresholds
Check if all thresholds passed. Failed thresholds indicate performance issues.
4
Examine checks
Review check pass rates. Low rates indicate functional issues.
5
Compare trends
Run tests regularly and compare results over time to detect performance regressions.
Common issues
High http_req_duration with low http_req_waiting
High http_req_duration with low http_req_waiting
Network latency or connection overhead is high. Check
http_req_connecting and http_req_tls_handshaking.High http_req_blocked values
High http_req_blocked values
Connection pool exhausted. Increase batch parallelism or check keep-alive settings.
Increasing response times over time
Increasing response times over time
System degradation. Could indicate memory leaks, resource exhaustion, or insufficient capacity.
Failed requests increasing with load
Failed requests increasing with load
System cannot handle the load. Scale infrastructure or optimize application.
Next steps
Now that you understand k6 results:Metrics Guide
Deep dive into all k6 metrics and metric types
Thresholds
Learn advanced threshold configurations
Result Outputs
Explore all result export options
Grafana Dashboards
Visualize results in Grafana