Files
cfw-autumn/server/benchmarks
2025-09-03 12:51:56 -07:00
..
2025-09-03 12:51:56 -07:00
2025-06-18 11:20:19 +03:00
2025-06-18 11:20:19 +03:00
2025-06-18 11:20:19 +03:00
2025-06-18 11:20:19 +03:00

Autumn Server Benchmarks

Fast, reliable performance testing for Autumn's core operations using dry runs and realistic workloads.

🎯 What This Measures

Customer Operations - Core customer lifecycle performance

  • Customer creation and setup
  • Usage tracking (light and heavy workloads)
  • Multi-feature billing calculations
  • Entitlement checks
  • Batch processing

Product & Billing - Subscription and pricing workflows

  • Free and paid plan signups
  • Plan upgrades and downgrades
  • Usage-based pricing calculations
  • Team plan setups
  • Bulk plan changes

🚀 Quick Start

# Run all benchmarks (recommended)
bun run benchmark

# Run specific category
bun run benchmark customer
bun run benchmark attach

# Export results for analysis
bun run benchmark --export

📊 Understanding Results

  • 🥇🥈🥉 Rankings by speed (fastest to slowest)
  • Green = Fast (< 5ms) | Yellow = Medium (5-20ms) | Red = Slow (> 20ms)
  • ops/sec = Operations per second throughput

Example Output

[1] Customer Creation                    2.1ms
[2] Usage Tracking (Light)               1.8ms  
[3] Free Plan Signup                     3.2ms
💡 12/14 operations under 5ms | Average: 3.1ms

🔧 Technical Details

  • 50 iterations per test with 5 warmup runs
  • Dry runs only - no database mutations or external API calls
  • Realistic latency simulation - mimics actual DB/Stripe response times
  • CPU work simulation - represents complex calculations

Perfect for CI/CD performance monitoring and optimization work!