Benchmarks
This directory contains performance benchmarks for the SMS-C system using Benchee.
Available Benchmarks
1. Raw SMS Benchmark (raw_sms_bench.exs)
Benchmarks the submit_message_raw API endpoint using real SMS PDUs.
Features:
- Uses real SMS PDUs (add your PDUs to the
@sample_pduslist in the file) - Disables duplicate detection by clearing fingerprints before each iteration
- Outputs both console and HTML reports
Usage:
mix run benchmarks/raw_sms_bench.exs
Output: benchmarks/output/raw_sms_benchmark.html
2. Message API Benchmark (message_api_bench.exs)
Benchmarks various message API operations including insert, retrieval, and routing.
Features:
- Tests insert_message (simple and with routing)
- Tests get_messages_for_smsc
- Tests list_message_queues
- Pre-populates database with test data for realistic scenarios
Usage:
mix run benchmarks/message_api_bench.exs
Output: benchmarks/output/message_api_benchmark.html
Configuration
All benchmarks use Benchee with the following default settings:
- Warmup: 2 seconds
- Time: 10 seconds
- Memory time: 2 seconds
- Extended statistics enabled
- HTML reports auto-generated
Outputs
HTML benchmark reports are generated in benchmarks/output/ and include:
- Detailed performance metrics
- Comparison charts
- Memory usage statistics
- Statistical analysis