Starting Nostr Relay Benchmark
Data Directory: /tmp/benchmark_nostr-rs-relay_8
Events: 10000, Workers: 8, Duration: 1m0s
20250912200137539643 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
20250912200137540391 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
20250912200137540449 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
20250912200137540903 INF (*types.Uint32)(0xc0001c24cc)({
 value: (uint32) 1
})
 /build/pkg/database/migrations.go:65
20250912200137540961 INF migrating to version 1... /build/pkg/database/migrations.go:79

=== Peak Throughput Test ===
Events saved: 10000/10000 (100.0%)
Duration: 657.896815ms
Events/sec: 15199.95
Avg latency: 508.699µs
P95 latency: 1.011413ms
P99 latency: 710.782µs

=== Burst Pattern Test ===
Burst completed: 1000 events in 149.389787ms
Burst completed: 1000 events in 138.154354ms
Burst completed: 1000 events in 139.952633ms
Burst completed: 1000 events in 148.684306ms
Burst completed: 1000 events in 154.779586ms
Burst completed: 1000 events in 163.72717ms
Burst completed: 1000 events in 142.665132ms
Burst completed: 1000 events in 151.637082ms
Burst completed: 1000 events in 143.018896ms
Burst completed: 1000 events in 157.963802ms
Burst test completed: 10000 events in 6.519459944s
Events/sec: 1533.87

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

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

Test: Peak Throughput
Duration: 657.896815ms
Total Events: 10000
Events/sec: 15199.95
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 153 MB
Avg Latency: 508.699µs
P95 Latency: 1.011413ms
P99 Latency: 710.782µs
----------------------------------------

Test: Burst Pattern
Duration: 6.519459944s
Total Events: 10000
Events/sec: 1533.87
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 206 MB
Avg Latency: 217.187µs
P95 Latency: 130.018µs
P99 Latency: 261.728µs
----------------------------------------

Test: Mixed Read/Write
Duration: 36.26569002s
Total Events: 10000
Events/sec: 275.74
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 225 MB
Avg Latency: 9.38757ms
P95 Latency: 19.250416ms
P99 Latency: 20.049957ms
----------------------------------------

Report saved to: /tmp/benchmark_nostr-rs-relay_8/benchmark_report.txt
20250912200220985006 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
20250912200221295381 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: 01. Size: 21 MiB of 21 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
20250912200221297677 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-12T20:02:21+00:00
BENCHMARK_CONFIG:
  Events: 10000
  Workers: 8
  Duration: 60s
