Skip to content

Latest commit

 

History

History
76 lines (61 loc) · 5.37 KB

File metadata and controls

76 lines (61 loc) · 5.37 KB

📊 k6 Load Testing Report

This report documents the load testing of the http://localhost:7777 endpoints using k6. The goal is to analyze performance, reliability, and correctness under simulated user load.

📅 Test Environment & Setup

Aspect Details
API Endpoint http://localhost:7777 (multiple APIs)
Test Tool k6 Load Testing Tool
Test Duration 40 seconds
Virtual Users Ramp-up to 100 concurrent users
Request Type HTTP POST (various endpoints)
Network Conditions Localhost (minimal network latency)

🧪 Test Objective

  • Simulate up to 100 virtual users (VUs) hitting various API endpoints
  • Measure API response time and throughput under load
  • Validate API correctness using k6 checks
  • Identify any errors, failures, or timeouts

✏️ Final Output

✓ /user/create status 200 or 500
✓ /authenticate status 200
✓ /authenticate has token
✓ /task/new status 200
✓ /task/update status 200
✓ /comment/new status 200

HTTP
http_req_duration.......................................................: avg=56.55ms min=471.6µs med=36.97ms  max=393.13ms p(90)=177.04ms p(95)=259.53ms
  { expected_response:true }............................................: avg=61.83ms min=471.6µs med=37.5ms   max=393.13ms p(90)=214.22ms p(95)=262.59ms
http_req_failed.........................................................: 17.56% 7219 out of 41095
http_reqs...............................................................: 41095  1026.737476/s

EXECUTION
iteration_duration......................................................: avg=283.4ms min=12.05ms med=300.09ms max=800.75ms p(90)=453.01ms p(95)=468.45ms
iterations..............................................................: 8219   205.347495/s
vus.....................................................................: 1      min=1        max=100
vus_max................................................................: 100    min=100      max=100

NETWORK
data_received...........................................................: 14 MB  344 kB/s
data_sent...............................................................: 7.3 MB 181 kB/s

🔍 Detailed Metrics Explanation

Metric Explanation Interpretation
http_req_duration (avg) Average duration of HTTP requests. Requests were fast: ~56.55 ms on average.
http_req_duration (p90) 90% of requests completed faster than this time. 90% of requests < 177 ms — good latency.
http_req_duration (p95) 95% of requests completed faster than this time. 95% of requests < 259 ms — minor spikes in latency.
http_req_failed % of requests that failed (non-2xx or network errors). 17.56% failed — needs investigation (likely /user/create 500 errors).
http_reqs Total HTTP requests sent. 41,095 requests made during test.
iteration_duration (avg) Avg duration of a full VU iteration. Each test loop took ~283 ms.
iteration_duration (p90) 90% of loops finished in < this time. 453 ms per loop at 90th percentile — smooth loop timing.
iteration_duration (p95) 95% of loops finished in < this time. 468 ms shows slight delays under high load.
vus Active virtual users at a time. Reached target 100 VUs.
vus_max Max number of VUs during test. Successfully scaled to 100 VUs.
data_received Total data received from server. 14 MB, expected for small API responses.
data_sent Total data sent to server. 7.3 MB of POST request bodies.

📈 Interpretation Summary

The load test results indicate:

  • Latency: Response times were excellent overall, with most requests under 200 ms even under high load.
  • Reliability: 17.56% of requests failed — likely due to duplicate user creation or auth conflicts. Needs error handling improvements.
  • Throughput: Achieved over 1,000 requests/sec locally — strong performance.
  • Correctness: All checks passed — status codes, tokens, empty bodies where expected.
  • User Simulation: Full 100 VUs were active; concurrency target achieved.
  • Data Volume: Reasonable amounts of data sent/received, typical for API CRUD operations.