Starting Nostr Relay Benchmark (Badger Backend) Data Directory: /tmp/benchmark_nostr-rs-relay_8 Events: 50000, Workers: 24, Duration: 1m0s 1763553920905673ℹ️ migrating to version 1... /build/pkg/database/migrations.go:66 1763553920905751ℹ️ migrating to version 2... /build/pkg/database/migrations.go:73 1763553920905773ℹ️ migrating to version 3... /build/pkg/database/migrations.go:80 1763553920905780ℹ️ cleaning up ephemeral events (kinds 20000-29999)... /build/pkg/database/migrations.go:287 1763553920905790ℹ️ cleaned up 0 ephemeral events from database /build/pkg/database/migrations.go:332 1763553920905809ℹ️ migrating to version 4... /build/pkg/database/migrations.go:87 1763553920905815ℹ️ converting events to optimized inline storage (Reiser4 optimization)... /build/pkg/database/migrations.go:340 1763553920905826ℹ️ found 0 events to convert (0 regular, 0 replaceable, 0 addressable) /build/pkg/database/migrations.go:429 1763553920905831ℹ️ migration complete: converted 0 events to optimized inline storage, deleted 0 old keys /build/pkg/database/migrations.go:538 ╔════════════════════════════════════════════════════════╗ ║ BADGER BACKEND BENCHMARK SUITE ║ ╚════════════════════════════════════════════════════════╝ === Starting Badger benchmark === RunPeakThroughputTest (Badger).. === Peak Throughput Test === 2025/11/19 12:05:20 WARN: Failed to load embedded library from /tmp/orly-libsecp256k1/libsecp256k1.so: Error relocating /tmp/orly-libsecp256k1/libsecp256k1.so: __fprintf_chk: symbol not found, falling back to system paths 2025/11/19 12:05:20 INFO: Successfully loaded libsecp256k1 v5.0.0 from system path: libsecp256k1.so.2 Events saved: 50000/50000 (100.0%), errors: 0 Duration: 2.982518845s Events/sec: 16764.35 Avg latency: 1.245012ms P90 latency: 1.807629ms P95 latency: 2.151312ms P99 latency: 3.240824ms Bottom 10% Avg latency: 614.335µs Wiping database between tests... RunBurstPatternTest (Badger).. === Burst Pattern Test === Burst completed: 5000 events in 281.003362ms Burst completed: 5000 events in 309.061248ms Burst completed: 5000 events in 287.188282ms Burst completed: 5000 events in 312.168826ms Burst completed: 5000 events in 265.066224ms Burst completed: 5000 events in 294.341689ms Burst completed: 5000 events in 347.422564ms Burst completed: 5000 events in 279.885181ms Burst completed: 5000 events in 261.874189ms Burst completed: 5000 events in 289.890466ms Burst test completed: 50000 events in 7.935611226s, errors: 0 Events/sec: 6300.71 Wiping database between tests... RunMixedReadWriteTest (Badger).. === Mixed Read/Write Test === Generating 1000 unique synthetic events (minimum 300 bytes each)... Generated 1000 events: Average content size: 312 bytes All events are unique (incremental timestamps) All events are properly signed Pre-populating database for read tests... Generating 50000 unique synthetic events (minimum 300 bytes each)... Generated 50000 events: Average content size: 314 bytes All events are unique (incremental timestamps) All events are properly signed Mixed test completed: 25000 writes, 25000 reads in 24.4135272s Combined ops/sec: 2048.04 Wiping database between tests... RunQueryTest (Badger).. === Query Test === Generating 10000 unique synthetic events (minimum 300 bytes each)... Generated 10000 events: Average content size: 313 bytes All events are unique (incremental timestamps) All events are properly signed Pre-populating database with 10000 events for query tests... Query test completed: 430130 queries in 1m0.004366885s Queries/sec: 7168.31 Avg query latency: 1.528235ms P95 query latency: 6.050953ms P99 query latency: 9.954498ms Wiping database between tests... RunConcurrentQueryStoreTest (Badger).. === Concurrent Query/Store Test === Generating 5000 unique synthetic events (minimum 300 bytes each)... Generated 5000 events: Average content size: 313 bytes All events are unique (incremental timestamps) All events are properly signed Pre-populating database with 5000 events for concurrent query/store test... Generating 50000 unique synthetic events (minimum 300 bytes each)... Generated 50000 events: Average content size: 314 bytes All events are unique (incremental timestamps) All events are properly signed Concurrent test completed: 333734 operations (283734 queries, 50000 writes) in 1m0.004269794s Operations/sec: 5561.84 Avg latency: 1.317015ms Avg query latency: 1.295184ms Avg write latency: 1.440899ms P95 latency: 3.369234ms P99 latency: 5.820636ms === Badger benchmark completed === ================================================================================ BENCHMARK REPORT ================================================================================ Test: Peak Throughput Duration: 2.982518845s Total Events: 50000 Events/sec: 16764.35 Success Rate: 100.0% Concurrent Workers: 24 Memory Used: 129 MB Avg Latency: 1.245012ms P90 Latency: 1.807629ms P95 Latency: 2.151312ms P99 Latency: 3.240824ms Bottom 10% Avg Latency: 614.335µs ---------------------------------------- Test: Burst Pattern Duration: 7.935611226s Total Events: 50000 Events/sec: 6300.71 Success Rate: 100.0% Concurrent Workers: 24 Memory Used: 289 MB Avg Latency: 869.47µs P90 Latency: 1.41943ms P95 Latency: 1.707251ms P99 Latency: 2.634998ms Bottom 10% Avg Latency: 297.293µs ---------------------------------------- Test: Mixed Read/Write Duration: 24.4135272s Total Events: 50000 Events/sec: 2048.04 Success Rate: 100.0% Concurrent Workers: 24 Memory Used: 129 MB Avg Latency: 348.336µs P90 Latency: 725.399µs P95 Latency: 816.334µs P99 Latency: 1.048158ms Bottom 10% Avg Latency: 906.961µs ---------------------------------------- Test: Query Performance Duration: 1m0.004366885s Total Events: 430130 Events/sec: 7168.31 Success Rate: 100.0% Concurrent Workers: 24 Memory Used: 109 MB Avg Latency: 1.528235ms P90 Latency: 4.478876ms P95 Latency: 6.050953ms P99 Latency: 9.954498ms Bottom 10% Avg Latency: 6.853109ms ---------------------------------------- Test: Concurrent Query/Store Duration: 1m0.004269794s Total Events: 333734 Events/sec: 5561.84 Success Rate: 100.0% Concurrent Workers: 24 Memory Used: 110 MB Avg Latency: 1.317015ms P90 Latency: 2.675799ms P95 Latency: 3.369234ms P99 Latency: 5.820636ms Bottom 10% Avg Latency: 3.995899ms ---------------------------------------- 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 RELAY_NAME: nostr-rs-relay RELAY_URL: ws://nostr-rs-relay:8080 TEST_TIMESTAMP: 2025-11-19T12:08:38+00:00 BENCHMARK_CONFIG: Events: 50000 Workers: 24 Duration: 60s