Skip to content

About

Nostr relay benchmarking tool

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

30 Commits

Folders and files

Repository files navigation

nostr-bench

Nostr relay benchmark tool written in Zig.

Requires Zig 0.16 or 0.17. For Zig 0.15, use the v0.1.1 release.

Build

zig build -Doptimize=ReleaseFast

Usage

# Benchmark a relay
./zig-out/bin/nostr-bench -r ws://localhost:7777

# Multiple relays
./zig-out/bin/nostr-bench -r ws://localhost:7777 -r ws://localhost:7778

# Custom parameters
./zig-out/bin/nostr-bench -r ws://localhost:7777 -e 10000 -w 8 --rate 1000

Options

-r, --relay <URL>       Relay WebSocket URL (can specify multiple)
-e, --events <N>        Number of events (default: 10000)
-w, --workers <N>       Concurrent workers (default: CPU/4)
-d, --duration <S>      Duration in seconds (default: 60)
--rate <N>              Events/sec per worker (default: 1000, 0 = unlimited)
--async                 Fire-and-forget mode
--report-file <PATH>    Write JSON report
--only-peak             Run only peak throughput test
--only-burst            Run only burst pattern test
--only-mixed            Run only mixed read/write test
--only-query            Run only query performance test
--only-concurrent       Run only concurrent query/store test

License

MIT

About

Nostr relay benchmarking tool

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages