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:
Metadata about the test run and its environment (
root_group,options,state).Comprehensive metrics capturing HTTP request counts, durations, failure rates, and detailed timing breakdowns.
Thresholds for key metrics to indicate pass/fail conditions.
Scenario-specific metrics, possibly representing different API endpoints or user flows (
scenario:utxos,scenario:account).
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
Type: Object
Purpose: Represents the root grouping of the test plan or scenario hierarchy.
Properties:
path (string): The hierarchical path of the group; empty at root.
id(string): Unique identifier (likely a hash).groups(array): Sub-groups within this root group; empty here.checks(array): Assertions or checks performed; empty here.name(string): Name of the group; empty for root.
**Usage:** Defines the top-level container for organizing tests or scenarios.
2. options
Type: Object
Purpose: Configuration options used to format or filter the test output.
Properties:
summaryTrendStats (array of strings): Statistical metrics to be included in summaries (e.g., average, min, median, percentiles).
summaryTimeUnit (string): Unit for time display (empty here, likely defaults).
noColor(boolean): Flag indicating if colored output is disabled.
**Usage:** Controls how summary data is presented or parsed downstream.
3. state
Type: Object
Purpose: Captures runtime or environment information about the test execution.
Properties:
isStdOutTTY(boolean): True if standard output is a TTY (interactive terminal).isStdErrTTY(boolean): True if standard error is a TTY.testRunDurationMs (number): Total duration of the test run in milliseconds (~5 minutes).
**Usage:** Useful for understanding the context of the test execution environment.
4. metrics
Type: Object
Purpose: Core section containing all performance and operational metrics captured during the test.
Each Metric:
Has a unique key (metric name or metric name with tags).
Contains:
type: The metric type (counter,trend,rate,gauge).contains: The data nature (e.g.,time,default,data).values: Statistical values (counts, averages, percentiles).Optional
thresholds: Pass/fail criteria for metric evaluation.
**Key Metrics Explained:**
Metric Name | Type | Description |
|---|---|---|
`http_reqs` | counter | Total number of HTTP requests made and their rate (RPS). |
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
Trend Metrics: Represent time-based continuous measurements, useful for latency and duration analysis.
Counter Metrics: Monotonically increasing counts, such as total requests or bytes.
Rate Metrics: Ratios of passes/fails or other binary outcomes, useful for reliability assessment.
Gauge Metrics: Represent instantaneous values, such as current or max number of virtual users.
Thresholds: Define performance goals or SLA checks (e.g.,
"p(95) < 800": {"ok": false}indicates that 95th percentile latency should be under 800 ms but failed).Scenario Tagging: Metrics are tagged with scenarios (e.g.,
scenario:utxos) to disaggregate performance data by user journey or API endpoint.
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
Load Testing Tool: This file is likely generated by a load testing tool (e.g., k6), which orchestrates HTTP requests against target services.
Performance Dashboards: Consumed by visualization tools or dashboards that track application health and performance trends.
CI/CD Pipelines: Used in automated quality gates to verify performance thresholds before deployment.
Alerting Systems: Threshold failures trigger alerts to development or operations teams.
Back-end Services: Reflects the performance of APIs (possibly Bitcoin and Ethereum blockchain services), aiding capacity planning and optimization.
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
File Purpose: Contains detailed performance metrics from a high-throughput HTTP load test.
Data Structure: JSON with nested objects representing test configuration, runtime state, and metrics.
Key Features: Captures request counts, latencies, failure rates, and virtual user statistics with scenario-level granularity.
Use Cases: Performance analysis, SLA verification, benchmarking, and capacity planning.
Integration Points: Load testing tools, monitoring dashboards, CI/CD pipelines, alerting systems.
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.