Starting Nostr Relay Benchmark
Data Directory: /tmp/benchmark_relayer-basic_8
Events: 10000, Workers: 8, Duration: 1m0s
20250912195956808180 INF /tmp/benchmark_relayer-basic_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
20250912195956808720 INF /tmp/benchmark_relayer-basic_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
20250912195956808755 INF /tmp/benchmark_relayer-basic_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
20250912195956809102 INF (*types.Uint32)(0xc0001bc04c)({
 value: (uint32) 1
})
 /build/pkg/database/migrations.go:65
20250912195956809190 INF migrating to version 1... /build/pkg/database/migrations.go:79

=== Peak Throughput Test ===
Events saved: 10000/10000 (100.0%)
Duration: 605.231707ms
Events/sec: 16522.60
Avg latency: 466.066µs
P95 latency: 514.849µs
P99 latency: 451.358µs

=== Burst Pattern Test ===
Burst completed: 1000 events in 149.715312ms
Burst completed: 1000 events in 146.385191ms
Burst completed: 1000 events in 147.010481ms
Burst completed: 1000 events in 151.671062ms
Burst completed: 1000 events in 143.215087ms
Burst completed: 1000 events in 137.331431ms
Burst completed: 1000 events in 155.735079ms
Burst completed: 1000 events in 161.246126ms
Burst completed: 1000 events in 140.174417ms
Burst completed: 1000 events in 144.819799ms
Burst test completed: 10000 events in 6.503155987s
Events/sec: 1537.71

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

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

Test: Peak Throughput
Duration: 605.231707ms
Total Events: 10000
Events/sec: 16522.60
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 152 MB
Avg Latency: 466.066µs
P95 Latency: 514.849µs
P99 Latency: 451.358µs
----------------------------------------

Test: Burst Pattern
Duration: 6.503155987s
Total Events: 10000
Events/sec: 1537.71
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 203 MB
Avg Latency: 215.609µs
P95 Latency: 141.91µs
P99 Latency: 204.819µs
----------------------------------------

Test: Mixed Read/Write
Duration: 37.45410417s
Total Events: 10000
Events/sec: 266.99
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 148 MB
Avg Latency: 9.851217ms
P95 Latency: 23.101412ms
P99 Latency: 17.889412ms
----------------------------------------

Report saved to: /tmp/benchmark_relayer-basic_8/benchmark_report.txt
20250912200041372670 INF /tmp/benchmark_relayer-basic_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
20250912200041686782 INF /tmp/benchmark_relayer-basic_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
20250912200041689009 INF /tmp/benchmark_relayer-basic_8: database closed /build/pkg/database/database.go:134

RELAY_NAME: relayer-basic
RELAY_URL: ws://relayer-basic:7447
TEST_TIMESTAMP: 2025-09-12T20:00:41+00:00
BENCHMARK_CONFIG:
  Events: 10000
  Workers: 8
  Duration: 60s
