Starting Nostr Relay Benchmark
Data Directory: /tmp/benchmark_nostr-rs-relay_8
Events: 10000, Workers: 8, Duration: 1m0s
20250912224044213613 INF /tmp/benchmark_nostr-rs-relay_8: All 0 tables opened in 0s
/go/pkg/mod/github.com/dgraph-io/badger/v4@v4.8.0/levels.go:161 /build/pkg/database/logger.go:57
20250912224044214094 INF /tmp/benchmark_nostr-rs-relay_8: Discard stats nextEmptySlot: 0
/go/pkg/mod/github.com/dgraph-io/badger/v4@v4.8.0/discard.go:55 /build/pkg/database/logger.go:57
20250912224044214130 INF /tmp/benchmark_nostr-rs-relay_8: Set nextTxnTs to 0
/go/pkg/mod/github.com/dgraph-io/badger/v4@v4.8.0/db.go:358 /build/pkg/database/logger.go:57
20250912224044214381 INF (*types.Uint32)(0xc000233c3c)({
 value: (uint32) 1
})
 /build/pkg/database/migrations.go:65
20250912224044214413 INF migrating to version 1... /build/pkg/database/migrations.go:79

=== Starting test round 1/2 ===

=== Peak Throughput Test ===
Events saved: 10000/10000 (100.0%)
Duration: 613.036589ms
Events/sec: 16312.24
Avg latency: 476.418µs
P90 latency: 627.852µs
P95 latency: 686.836µs
P99 latency: 841.471µs
Bottom 10% Avg latency: 722.179µs

=== Burst Pattern Test ===
Burst completed: 1000 events in 156.218882ms
Burst completed: 1000 events in 170.25756ms
Burst completed: 1000 events in 164.944293ms
Burst completed: 1000 events in 162.767866ms
Burst completed: 1000 events in 148.744622ms
Burst completed: 1000 events in 163.556351ms
Burst completed: 1000 events in 172.007512ms
Burst completed: 1000 events in 159.806858ms
Burst completed: 1000 events in 168.086258ms
Burst completed: 1000 events in 164.931889ms
Burst test completed: 10000 events in 6.657581804s
Events/sec: 1502.05

=== Mixed Read/Write Test ===
Pre-populating database for read tests...
Mixed test completed: 5000 writes, 5000 reads in 34.850355805s
Combined ops/sec: 286.94

Pausing 10s before next round...

=== Starting test round 2/2 ===

=== Peak Throughput Test ===
Events saved: 10000/10000 (100.0%)
Duration: 707.652249ms
Events/sec: 14131.23
Avg latency: 551.706µs
P90 latency: 724.937µs
P95 latency: 790.563µs
P99 latency: 980.677µs
Bottom 10% Avg latency: 836.659µs

=== Burst Pattern Test ===
Burst completed: 1000 events in 164.62419ms
Burst completed: 1000 events in 155.938167ms
Burst completed: 1000 events in 132.903056ms
Burst completed: 1000 events in 142.377596ms
Burst completed: 1000 events in 155.024184ms
Burst completed: 1000 events in 147.095521ms
Burst completed: 1000 events in 150.027389ms
Burst completed: 1000 events in 152.873043ms
Burst completed: 1000 events in 150.635479ms
Burst completed: 1000 events in 146.45553ms
Burst test completed: 10000 events in 6.519122877s
Events/sec: 1533.95

=== Mixed Read/Write Test ===
Pre-populating database for read tests...
Mixed test completed: 5000 writes, 4806 reads in 1m0.03930731s
Combined ops/sec: 163.33

================================================================================
BENCHMARK REPORT
================================================================================

Test: Peak Throughput
Duration: 613.036589ms
Total Events: 10000
Events/sec: 16312.24
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 154 MB
Avg Latency: 476.418µs
P90 Latency: 627.852µs
P95 Latency: 686.836µs
P99 Latency: 841.471µs
Bottom 10% Avg Latency: 722.179µs
----------------------------------------

Test: Burst Pattern
Duration: 6.657581804s
Total Events: 10000
Events/sec: 1502.05
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 209 MB
Avg Latency: 182.765µs
P90 Latency: 234.409µs
P95 Latency: 257.082µs
P99 Latency: 330.764µs
Bottom 10% Avg Latency: 277.843µs
----------------------------------------

Test: Mixed Read/Write
Duration: 34.850355805s
Total Events: 10000
Events/sec: 286.94
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 221 MB
Avg Latency: 8.802188ms
P90 Latency: 19.075904ms
P95 Latency: 20.680962ms
P99 Latency: 22.78326ms
Bottom 10% Avg Latency: 20.897398ms
----------------------------------------

Test: Peak Throughput
Duration: 707.652249ms
Total Events: 10000
Events/sec: 14131.23
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 120 MB
Avg Latency: 551.706µs
P90 Latency: 724.937µs
P95 Latency: 790.563µs
P99 Latency: 980.677µs
Bottom 10% Avg Latency: 836.659µs
----------------------------------------

Test: Burst Pattern
Duration: 6.519122877s
Total Events: 10000
Events/sec: 1533.95
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 168 MB
Avg Latency: 204.873µs
P90 Latency: 271.569µs
P95 Latency: 329.28µs
P99 Latency: 558.829µs
Bottom 10% Avg Latency: 380.136µs
----------------------------------------

Test: Mixed Read/Write
Duration: 1m0.03930731s
Total Events: 9806
Events/sec: 163.33
Success Rate: 98.1%
Concurrent Workers: 8
Memory Used: 164 MB
Avg Latency: 19.506135ms
P90 Latency: 43.206775ms
P95 Latency: 45.944446ms
P99 Latency: 49.910436ms
Bottom 10% Avg Latency: 46.417943ms
----------------------------------------

Report saved to: /tmp/benchmark_nostr-rs-relay_8/benchmark_report.txt
AsciiDoc report saved to: /tmp/benchmark_nostr-rs-relay_8/benchmark_report.adoc
20250912224323628137 INF /tmp/benchmark_nostr-rs-relay_8: Lifetime L0 stalled for: 0s
/go/pkg/mod/github.com/dgraph-io/badger/v4@v4.8.0/db.go:536 /build/pkg/database/logger.go:57
20250912224324180883 INF /tmp/benchmark_nostr-rs-relay_8: 
Level 0 [ ]: NumTables: 00. Size: 0 B of 0 B. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 64 MiB
Level 1 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 2 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 3 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 4 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 5 [B]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 6 [ ]: NumTables: 02. Size: 41 MiB of 41 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 4.0 MiB
Level Done
/go/pkg/mod/github.com/dgraph-io/badger/v4@v4.8.0/db.go:615 /build/pkg/database/logger.go:57
20250912224324184069 INF /tmp/benchmark_nostr-rs-relay_8: database closed /build/pkg/database/database.go:134

RELAY_NAME: nostr-rs-relay
RELAY_URL: ws://nostr-rs-relay:8080
TEST_TIMESTAMP: 2025-09-12T22:43:24+00:00
BENCHMARK_CONFIG:
  Events: 10000
  Workers: 8
  Duration: 60s
