cardano-foundation / cardano-foundation/cardano-rosetta-java

Replace ab with locust for realistic load testing

Open
#638 0 comments 0 reactions 1 assignee Claimed by @linconvidal View on GitHub
Performance Improvement Spike tests
Dominant language
Java
Stars
26
Forks
15
Avg merge
5d 3h
Merged PRs (30d)
2

Description

## Problem

Current `stability_test.py` uses Apache Bench which sends **identical payloads** repeatedly:
- Database caching heavily skews results
- Doesn't reveal performance differences based on UTXO count, transaction history, or block size
- Can't vary data per request
- Unrealistic compared to production traffic patterns

## Proposed Solution

**Tool**: Locust (Python-based load testing framework)

**Key Benefits**:
- Read CSV with multiple rows, cycle through different data per request
- Built-in p95/p99 percentile metrics
- Real-time web UI for monitoring
- Can weight endpoints differently (e.g., account/balance gets 10x more traffic than construction/metadata)
- CI/CD friendly headless mode

## Data Strategy

Create varied CSV files with diverse data profiles:

**Address Diversity:**
- Light (1-10 UTXOs), Medium (100-1K UTXOs), Heavy (10K+ UTXOs)
- New addresses (few txs) vs old addresses (thousands of txs)

**Block Diversity:**
- Light blocks (1-5 txs) vs heavy blocks (100+ txs)
- Recent blocks vs historical blocks

**Transaction Diversity:**
- Small (<500 bytes) vs large (>10KB)
- With/without metadata, with/without native assets

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.