bench

command
v1.1.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

README

KV Executor Stress Test

Stress test for the KV executor HTTP server. Sends transactions via raw TCP connections to maximize throughput, targeting 10M req/s.

Building

go build -o stress-test ./kv/bench/

Usage

Run the testapp first, then the stress test alongside it:

# Terminal 1: start the testapp with KV endpoint
./build/testapp start --kv-endpoint localhost:9090

# Terminal 2: run the stress test
./stress-test --addr localhost:9090 --duration 10s --workers 1000

Flags

Flag Default Description
-addr localhost:9090 Server host:port
-duration 10s Test duration
-workers 1000 Number of concurrent TCP workers
-target-rps 10000000 Target requests per second (goal)

Output

The tool prints live progress (req/s) during the run, then a summary table with:

  • Avg req/s and peak req/s
  • Total requests, successes, and failures
  • Server-side stats: blocks produced, txs executed, avg txs per block
  • Whether the 10M req/s goal was reached (displays SUCCESS if so)

/stats Endpoint

The KV executor HTTP server exposes a /stats endpoint (GET) returning:

{
  "injected_txs": 52345678,
  "executed_txs": 1234567,
  "blocks_produced": 1000
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL