Skip to content

sklad-dev/overload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

overload.

overload is a simple tool to measure Sklad datastore performance. It opens multiple concurrent clients and sends random set and get commands using realistic-looking data (emails as keys and full names as values), then reports latency statistics and overall throughput.

How it works

The tool generates requests of the form:

  • set '<email>' '<full name>'
  • get '<email>'

It then wraps each request in a JSON payload and sends it over TCP.

{
  "kind": 1,
  "query": "set 'someone@example.com' 'John Doe'",
  "timestamp": 1732036720123
}

At the end, overload aggregates basic metrics: total requests, average, min and max latency, elapsed time and throughput (requests per second).

Usage

From the project root:

go run ./...

Flags

  • -addr – TCP address of the Sklad server.
    • Default: localhost:7733
  • -concurrency – number of concurrent clients.
    • Default: number of logical CPUs (runtime.NumCPU()).
  • -requests – total number of requests to send.
    • Default: 10000.
  • -writes - fraction of write requests.
    • Default: 0.5
  • -log-every - log progress every N requests (0 to disable).
    • Default: 10000

Example:

go run ./... \
  -addr=localhost:7733 \
  -concurrency=32 \
  -requests=500000

Example output:

Concurrency: 32
Total requests: 500000
Writes fraction: 0.5
Requests: 500000
Avg: 1.2ms
Min: 200µs
Max: 30ms
P50: 1ms
P95: 4ms
P99: 10ms
Elapsed: 4.25s
Retries: 0
Errors: 0
Success rate: 100.00%
Throughput: 117647.06 req/s
All done.

Dependencies

About

A simple load-testing tool for Sklad key-value storage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages