Starting Nostr Relay Benchmark
Data Directory: /tmp/benchmark_khatru-badger_8
Events: 10000, Workers: 8, Duration: 1m0s
20250912223222496620 INF /tmp/benchmark_khatru-badger_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
20250912223222497154 INF /tmp/benchmark_khatru-badger_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
20250912223222497184 INF /tmp/benchmark_khatru-badger_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
20250912223222497402 INF (*types.Uint32)(0xc0000100fc)({
 value: (uint32) 1
})
 /build/pkg/database/migrations.go:65
20250912223222497454 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: 577.614152ms
Events/sec: 17312.60
Avg latency: 448.778µs
P90 latency: 584.783µs
P95 latency: 633.085µs
P99 latency: 749.537µs
Bottom 10% Avg latency: 664.268µs

=== Burst Pattern Test ===
Burst completed: 1000 events in 161.62554ms
Burst completed: 1000 events in 154.666063ms
Burst completed: 1000 events in 149.999903ms
Burst completed: 1000 events in 169.141205ms
Burst completed: 1000 events in 153.987041ms
Burst completed: 1000 events in 141.227756ms
Burst completed: 1000 events in 168.989116ms
Burst completed: 1000 events in 161.032171ms
Burst completed: 1000 events in 182.128996ms
Burst completed: 1000 events in 161.86147ms
Burst test completed: 10000 events in 6.628942674s
Events/sec: 1508.54

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

Pausing 10s before next round...

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

=== Peak Throughput Test ===
Events saved: 10000/10000 (100.0%)
Duration: 627.589155ms
Events/sec: 15933.99
Avg latency: 489.881µs
P90 latency: 628.857µs
P95 latency: 679.363µs
P99 latency: 828.307µs
Bottom 10% Avg latency: 716.862µs

=== Burst Pattern Test ===
Burst completed: 1000 events in 150.262543ms
Burst completed: 1000 events in 148.027109ms
Burst completed: 1000 events in 139.184066ms
Burst completed: 1000 events in 147.196277ms
Burst completed: 1000 events in 141.143557ms
Burst completed: 1000 events in 138.727197ms
Burst completed: 1000 events in 143.014207ms
Burst completed: 1000 events in 143.355055ms
Burst completed: 1000 events in 162.573956ms
Burst completed: 1000 events in 142.875393ms
Burst test completed: 10000 events in 6.475822519s
Events/sec: 1544.21

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

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

Test: Peak Throughput
Duration: 577.614152ms
Total Events: 10000
Events/sec: 17312.60
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 152 MB
Avg Latency: 448.778µs
P90 Latency: 584.783µs
P95 Latency: 633.085µs
P99 Latency: 749.537µs
Bottom 10% Avg Latency: 664.268µs
----------------------------------------

Test: Burst Pattern
Duration: 6.628942674s
Total Events: 10000
Events/sec: 1508.54
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 204 MB
Avg Latency: 196.38µs
P90 Latency: 260.706µs
P95 Latency: 293.579µs
P99 Latency: 385.694µs
Bottom 10% Avg Latency: 317.532µs
----------------------------------------

Test: Mixed Read/Write
Duration: 36.466065909s
Total Events: 10000
Events/sec: 274.23
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 128 MB
Avg Latency: 9.448363ms
P90 Latency: 20.988228ms
P95 Latency: 22.727378ms
P99 Latency: 25.094784ms
Bottom 10% Avg Latency: 23.01277ms
----------------------------------------

Test: Peak Throughput
Duration: 627.589155ms
Total Events: 10000
Events/sec: 15933.99
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 124 MB
Avg Latency: 489.881µs
P90 Latency: 628.857µs
P95 Latency: 679.363µs
P99 Latency: 828.307µs
Bottom 10% Avg Latency: 716.862µs
----------------------------------------

Test: Burst Pattern
Duration: 6.475822519s
Total Events: 10000
Events/sec: 1544.21
Success Rate: 100.0%
Concurrent Workers: 8
Memory Used: 170 MB
Avg Latency: 215.418µs
P90 Latency: 287.237µs
P95 Latency: 339.025µs
P99 Latency: 510.682µs
Bottom 10% Avg Latency: 378.172µs
----------------------------------------

Test: Mixed Read/Write
Duration: 1m0.036644794s
Total Events: 9742
Events/sec: 162.27
Success Rate: 97.4%
Concurrent Workers: 8
Memory Used: 181 MB
Avg Latency: 19.714686ms
P90 Latency: 44.573506ms
P95 Latency: 46.895555ms
P99 Latency: 50.425027ms
Bottom 10% Avg Latency: 47.384489ms
----------------------------------------

Report saved to: /tmp/benchmark_khatru-badger_8/benchmark_report.txt
AsciiDoc report saved to: /tmp/benchmark_khatru-badger_8/benchmark_report.adoc
20250912223503335481 INF /tmp/benchmark_khatru-badger_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
20250912223504473151 INF /tmp/benchmark_khatru-badger_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
20250912223504475627 INF /tmp/benchmark_khatru-badger_8: database closed /build/pkg/database/database.go:134

RELAY_NAME: khatru-badger
RELAY_URL: ws://khatru-badger:3334
TEST_TIMESTAMP: 2025-09-12T22:35:04+00:00
BENCHMARK_CONFIG:
  Events: 10000
  Workers: 8
  Duration: 60s
