Skip to content

Client Load Testing: implement request data dependent endpoint tests #573

@sreuland

Description

@sreuland

Summary

Add support for the data dependent endpoints: getLedgerEntries, getLedgers, getTransaction, getTransactions, getEvents. These endpoints require more sophisticated request generation strategies based on pre-collected bootstrap(seed) data. Using vegata custom targeters to achieve parameter injections.

Related to: Cliient load testing tool Feature - stellar/stellar-rpc-blaster#4
Related to: Client load testing Epic - stellar/stellar-rpc-blaster#2

Prerequisite

Depends on stellar/stellar-rpc-blaster#3 and #572 to be done first. Create the CLI tool 'generate' and 'run' commands first.

Implementation Details

Use vegata custom targets for injecting request data for the htttp client requests. Refer to this chat session for a vibe coded PoC of using vegata against getTransaction.

Endpoint - getLedgers

Request Generation Strategy:

  • Use ledger sequences from bootstrap.dat
  • Vary startLedger values across the collected ledger range
  • Use different pagination limits (1-100)
  • Mix of cursor-based pagination
  • Include both format: "xdr" and format: "json" requests

Endpoint - getLedgerEntries

Request Generation Strategy:

  • Use ledger keys from bootstrap.dat
  • Vary key count (1-200 keys per request)
  • Use realistic key distributions:
    • 80% single key requests
    • 15% requests with 2-10 keys
    • 5% bulk requests with 50-200 keys
  • Mix of cursor-based pagination
  • Support both XDR and JSON format requests

Endpoint - getTransaction

Request Generation Strategy:

  • Use transaction hashes from bootstrap.dat
  • Mix of recent successful, recent failed, and random (not found) hashes
  • Ratio: 70% found, 30% not found
  • Support both XDR and JSON format requests

Endpoint - getTransactions

Request Generation Strategy:

  • Query ranges based on ledger sequences from bootstrap.dat
  • Use varied pagination parameters (limit 1-200)
  • Mix of cursor-based pagination
  • Support both XDR and JSON format requests

Endpoint - getEvents

Request Generation Strategy:

  • Use contract IDs and event topics from bootstrap.dat
  • Generate varied filter combinations:
    • Single contract ID queries
    • Multiple contract IDs
    • Event type filters (contract, system, diagnostic)
    • Topic filters
    • Combined filters
  • Use some ledger ranges
  • Vary pagination limits (1-100)
  • Mix of cursor-based pagination

Configuration Updates

Update TOML configuration to include new endpoints:

[endpoints]

getLedgers.rps = 2.0
getLedgerEntries.rps = 10.0
getTransaction.rps = 5.0
getTransactions.rps = 2.0
getEvents.rps = 8.0

Bootstrap Data

Confirm the generate command (#570) collects the expected seed data required for each new endpoint added:

  • Transaction hashes (both successful and failed)
  • Contract IDs with activity
  • Event topics from contracts
  • Ledger keys(account, contract data, contract code, trustlines)
  • Ledger sequences

Metrics

  • Update console output to include new endpoints in status display
  • Update final json results metrics to include new endpoints.

Acceptance Criteria

  • New endpoint load tests (getTransaction, getTransactions, getEvents, getLedgerEntries, getLedgers) generate load correctly using bootstrap data during run
  • Real-time console output efficiently displays metrics for all endpoints
  • Final JSON output includes complete metrics for all endpoints
  • README updated with complete usage examples and all endpoint configurations

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions