result-api-scaled-1-500rps.json


Overview

`result-api-scaled-1-500rps.json` is a performance test results data file representing the output of a load testing run, likely from a tool such as [k6](https://k6.io/) or a similar HTTP load testing framework. The file stores metrics collected under a scenario that simulates API requests scaled linearly from 1 to 500 requests per second (RPS).

This JSON file captures detailed statistical summaries of HTTP request durations, failure rates, iteration durations, virtual user (VU) counts, and data transfer volumes. These metrics are essential for analyzing the behavior, performance, and reliability of an API under high load conditions.


Detailed Structure and Explanation

This file does **not** contain classes or functions as it is a data file (JSON), but it organizes information into several key sections:

1. root_group

2. options

3. state

4. metrics


Key Metrics Explained

Metric Name

Type

Description

`http_req_duration`

trend

Duration of HTTP requests in milliseconds with statistics like avg, min, median, max, percentiles.

`http_req_failed{scenario:rps}`

rate

Failure rate of requests in the "rps" scenario, with counts of passes and fails.

`iteration_duration`

trend

Duration of each test iteration (virtual user cycle) in milliseconds with detailed stats.

`http_req_duration{status:200}`

trend

HTTP request durations filtered by HTTP 200 status responses.

`http_req_duration{scenario:rps}`

trend

HTTP request durations filtered by the "rps" scenario.

`http_req_blocked`

trend

Time spent blocked before sending HTTP requests.

`http_req_tls_handshaking`

trend

Time spent on TLS handshake during requests.

`http_req_duration{expected_response:true}`

trend

Duration of requests where the expected response was received.

`data_sent`

counter

Total amount of data sent in bytes and rate.

`http_req_receiving`

trend

Time spent receiving HTTP response data.

`vus_max`

gauge

Maximum number of virtual users during the test.

`http_req_sending`

trend

Time spent sending HTTP request data.

`data_received`

counter

Total amount of data received in bytes and rate.

`http_req_waiting`

trend

Time spent waiting for a response from the server (TTFB).

`vus`

gauge

Number of virtual users during the test.

`http_reqs`

counter

Total number of HTTP requests sent and rate.

`http_req_failed`

rate

Overall HTTP request failure rate.

`dropped_iterations`

counter

Number of test iterations dropped due to system constraints.

`iterations`

counter

Total iterations completed and rate.

`http_req_connecting`

trend

Time spent establishing TCP connections.


Usage of Metrics (Example)

To analyze the API's responsiveness under load, a performance engineer can:


Important Implementation Details


Interaction with Other Parts of the System


Visual Diagram: Flowchart of Metrics Structure

flowchart TD
    A[Metrics] --> B[Trend Metrics]
    A --> C[Rate Metrics]
    A --> D[Counter Metrics]
    A --> E[Gauge Metrics]

    B --> B1["http_req_duration"]
    B --> B2["iteration_duration"]
    B --> B3["http_req_blocked"]
    B --> B4["http_req_tls_handshaking"]
    B --> B5["http_req_duration{status:200}"]
    B --> B6["http_req_duration{scenario:rps}"]
    B --> B7["http_req_receiving"]
    B --> B8["http_req_sending"]
    B --> B9["http_req_waiting"]
    B --> B10["http_req_connecting"]

    C --> C1["http_req_failed"]
    C --> C2["http_req_failed{scenario:rps}"]

    D --> D1["http_reqs"]
    D --> D2["data_sent"]
    D --> D3["data_received"]
    D --> D4["dropped_iterations"]
    D --> D5["iterations"]

    E --> E1["vus"]
    E --> E2["vus_max"]

Summary

This JSON file is a comprehensive snapshot of load test metrics for an API under a scaled load scenario (1 to 500 RPS). It captures detailed timing, success/failure rates, data throughput, and virtual user counts, enabling deep performance analysis and validation against defined thresholds.

By understanding and interpreting these metrics, stakeholders can make informed decisions about API scalability, optimize bottlenecks, and ensure reliable user experiences under high loads.