Starting Nostr Relay Benchmark
Data Directory: /tmp/benchmark_khatru-sqlite_8
Events: 10000, Workers: 8, Duration: 1m0s
20250912195817361580 INF /tmp/benchmark_khatru-sqlite_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
20250912195817362030 INF /tmp/benchmark_khatru-sqlite_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
20250912195817362064 INF /tmp/benchmark_khatru-sqlite_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
20250912195817362711 INF (*types.Uint32)(0xc00000005c)({
 value: (uint32) 1
})
 /build/pkg/database/migrations.go:65
20250912195817362777 INF migrating to version 1... /build/pkg/database/migrations.go:79

=== Peak Throughput Test ===
Events saved: 10000/10000 (100.0%)
Duration: 699.706889ms
Events/sec: 14291.70
Avg latency: 545.724µs
P95 latency: 473.43µs
P99 latency: 478.349µs

=== Burst Pattern Test ===
Burst completed: 1000 events in 138.253122ms
Burst completed: 1000 events in 153.709429ms
Burst completed: 1000 events in 158.711026ms
Burst completed: 1000 events in 152.54677ms
Burst completed: 1000 events in 144.735244ms
Burst completed: 1000 events in 153.236893ms
Burst completed: 1000 events in 150.180515ms
Burst completed: 1000 events in 154.733588ms
Burst completed: 1000 events in 151.252182ms
Burst completed: 1000 events in 150.610613ms
Burst test completed: 10000 events in 6.534724469s
Events/sec: 1530.29

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

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

Test: Peak Throughput
Duration: 699.706889ms
Total Events: 10000
Events/sec: 14291.70
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 154 MB
Avg Latency: 545.724µs
P95 Latency: 473.43µs
P99 Latency: 478.349µs
----------------------------------------

Test: Burst Pattern
Duration: 6.534724469s
Total Events: 10000
Events/sec: 1530.29
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 208 MB
Avg Latency: 205.962µs
P95 Latency: 165.525µs
P99 Latency: 253.411µs
----------------------------------------

Test: Mixed Read/Write
Duration: 35.563312501s
Total Events: 10000
Events/sec: 281.19
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 146 MB
Avg Latency: 9.092604ms
P95 Latency: 19.302571ms
P99 Latency: 16.944829ms
----------------------------------------

Report saved to: /tmp/benchmark_khatru-sqlite_8/benchmark_report.txt
20250912195900161526 INF /tmp/benchmark_khatru-sqlite_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
20250912195900909573 INF /tmp/benchmark_khatru-sqlite_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
20250912195900911092 INF /tmp/benchmark_khatru-sqlite_8: database closed /build/pkg/database/database.go:134

RELAY_NAME: khatru-sqlite
RELAY_URL: ws://khatru-sqlite:3334
TEST_TIMESTAMP: 2025-09-12T19:59:01+00:00
BENCHMARK_CONFIG:
  Events: 10000
  Workers: 8
  Duration: 60s
