Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kwsantiago
Copy link
Collaborator

Summary

Added a comprehensive benchmark tool to measure Orly relay performance for both event ingestion and query operations.

What's New

  • Benchmark Tool: Standalone tool to test relay performance (cmd/benchmark/benchmark_simple.go)
  • Concurrent Testing: Supports 1-50+ concurrent publishers
  • Query Testing: Tests 5 different query patterns (by kind, time, tag, author, complex)
  • Detailed Metrics: Reports events/sec, MB/sec, queries/sec

Performance Results

Peak Performance

  • 21,119 events/second (50 concurrent publishers)
  • 198.28 MB/second bandwidth
  • 16 queries/second on fresh database

Typical Performance (10 concurrent publishers, 2KB events)

  • 16,714 events/second
  • 128.38 MB/second
  • 11 queries/second

Usage

# Build
go build -o benchmark-simple ./cmd/benchmark/benchmark_simple.go

# Run full benchmark
./benchmark-simple -relay ws://localhost:3334 -events 10000 -concurrency 10

# Test only publishing
./benchmark-simple -relay ws://localhost:3334 -events 50000 -concurrency 20 -skip-query

# Test only queries
./benchmark-simple -relay ws://localhost:3334 -queries 500 -skip-publish

Files Added

  • cmd/benchmark/benchmark_simple.go - Main benchmark tool
  • cmd/benchmark/BENCHMARK_RESULTS.md - Detailed test results
  • cmd/benchmark/README.md - Usage documentation
  • cmd/benchmark/run_benchmark.sh - Convenience script

@mleku mleku merged commit 996fb3a into mleku:main Aug 5, 2025
@kwsantiago kwsantiago deleted the kwsantiago/benchmark branch August 5, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants