btc-eth-2000rps.json


Overview

The `btc-eth-2000rps.json` file is a structured JSON document that contains detailed performance testing metrics and configuration data, primarily related to HTTP request load testing. The context suggests this file is a report or snapshot from a load testing tool (such as [k6](https://k6.io/)) simulating high throughput scenarios, likely targeting cryptocurrency-related APIs or services (Bitcoin and Ethereum, inferred from the filename).

The file encapsulates:

This file is intended for consumption by reporting tools, dashboards, or automated systems to analyze the performance and reliability of backend services under heavy load (around 2000 requests per second, as per the filename).


Detailed Structure and Explanation

1. root_group

**Usage:** Defines the top-level container for organizing tests or scenarios.


2. options

**Usage:** Controls how summary data is presented or parsed downstream.


3. state

**Usage:** Useful for understanding the context of the test execution environment.


4. metrics

**Key Metrics Explained:**

Metric Name

Type

Description

`http_reqs`

counter

Total number of HTTP requests made and their rate (RPS).

http_req_duration{scenario:utxos}

trend

Request duration stats for `utxos` scenario.

`http_req_duration{scenario:account}`

trend

Request duration stats for `account` scenario.

`http_req_failed{scenario:account}`

rate

Failure rate of requests in `account` scenario.

`http_req_failed{scenario:utxos}`

rate

Failure rate of requests in `utxos` scenario.

`data_sent`

counter

Total bytes sent and rate of sending.

`data_received`

counter

Total bytes received and rate of receiving.

`vus` and `vus_max`

gauge

Number of virtual users active and maximum during test.

`iteration_duration`

trend

Duration of iterations (full cycle of virtual user actions).

Various [http_req_*](/projects/291/69215) (blocked, connecting, sending, waiting, receiving, tls_handshaking)

trend

Detailed breakdown of HTTP request lifecycle timings.


Important Implementation Details


Usage Examples

While this file itself is a data snapshot, here is how it might be used in an application context:

// Example: Parsing metrics for reporting

const report = require('./btc-eth-2000rps.json');

const httpReqCount = report.metrics.http_reqs.values.count;
const avgDurationAccount = report.metrics["http_req_duration{scenario:account}"].values.avg;
const failureRateUtxos = report.metrics["http_req_failed{scenario:utxos}"].values.rate;

console.log(`Total HTTP Requests: ${httpReqCount}`);
console.log(`Average Account Scenario Request Duration: ${avgDurationAccount} ms`);
console.log(`Utxos Scenario Failure Rate: ${(failureRateUtxos * 100).toFixed(2)}%`);

Interaction with Other System Components


Visual Diagram: Metrics Flowchart

Below is a flowchart illustrating the relationship between the main metric types and their sub-metrics within this file:

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

    B --> B1[http_reqs]
    B --> B2[data_sent]
    B --> B3[data_received]
    B --> B4[iterations]
    B --> B5[dropped_iterations]

    C --> C1[http_req_duration]
    C --> C2[http_req_blocked]
    C --> C3[http_req_connecting]
    C --> C4[http_req_sending]
    C --> C5[http_req_waiting]
    C --> C6[http_req_receiving]
    C --> C7[http_req_tls_handshaking]
    C --> C8[iteration_duration]

    D --> D1[http_req_failed]
    D --> D2[http_req_failed{scenario:account}]
    D --> D3[http_req_failed{scenario:utxos}]

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

Summary

This file is a crucial artifact in performance engineering workflows, providing insights necessary to ensure backend systems meet expected load and reliability targets under stress conditions.