Comprehensive performance benchmarking framework comparing Tuono, Bun, Next.js, Deno, Astro (CSR), Astro (SSR), TanStack Start, and Astro+Askama with identical UI and backend implementations.
This repository contains eight equivalent SSR/CSR React applications built with different frameworks:
- Tuono (Rust + React SSR) - Port 3000
- Bun (Bun runtime + React) - Port 3001
- Next.js (Node.js + React SSR) - Port 3002
- Deno Fresh (Deno + Preact) - Port 3003
- Astro + React CSR (Client-Side Rendering) - Port 3004
- Astro + React + Bun SSR (Server-Side Rendering with Bun) - Port 3005
- TanStack Start + Bun (SSR with TanStack Router) - Port 3006
- Astro + React + Askama (Hybrid: Rust templating + React CSR) - Port 3007
All applications implement the same UI and functionality for fair performance comparison.
- Tool: wrk
- Metrics: Requests/sec, latency, throughput
- Configuration: 30s duration, 12 threads, 400 connections
- Tool: Lighthouse CI
- Metrics: Performance score, Core Web Vitals, Accessibility, SEO
- Configuration: 3 runs per framework, averaged results
# Install Node.js, Bun, Deno, and Rust
node --version # v20+
bun --version # 1.0+
deno --version # 1.37+
rustc --version # 1.70+
# Install wrk
sudo apt-get install wrk # Ubuntu/Debian
brew install wrk # macOS
# Install Lighthouse CI
npm install -g @lhci/cli# Make script executable
chmod +x scripts/run-benchmarks.sh
# Run all benchmarks
./scripts/run-benchmarks.sh
# View results
cat reports/latest/index.mdperformance_test/
βββ tuono-test/ # Tuono (Rust + React SSR)
βββ bun-test/ # Bun SSR
βββ nextjs-test/ # Next.js 14+
βββ deno-test/ # Deno Fresh
βββ astro-react-csr/ # Astro + React (CSR)
βββ astro-react-bun-ssr/ # Astro + React + Bun (SSR)
βββ tanstack-start-bun/ # TanStack Start + Bun
βββ astro-react-askama/ # Astro + React + Askama
βββ scripts/
β βββ run-benchmarks.sh # Main benchmark orchestrator
β βββ generate-report.js # Report generator
βββ config/
β βββ benchmark-config.json # Framework configuration
βββ reports/
β βββ latest/ # Latest benchmark results
β βββ history/ # Historical archives
βββ .github/workflows/
β βββ performance-benchmark.yml
βββ README.md
cd tuono-test
npm install
cargo run --release
# Server: http://localhost:3000cd bun-test
bun install
bun run start
# Server: http://localhost:3001cd nextjs-test
npm install
npm run build
npm run start
# Server: http://localhost:3002cd deno-test
deno task start
# Server: http://localhost:3003cd astro-react-csr
npm install
npm run build
npm run preview -- --port 3004
# Server: http://localhost:3004cd astro-react-bun-ssr
bun install
bun run build
bun run ./dist/server/entry.mjs
# Server: http://localhost:3005cd tanstack-start-bun
bun install
bun run build
bun run .output/server/index.mjs
# Server: http://localhost:3006cd astro-react-askama
npm install
npm run build
cargo build --release
cargo run --release
# Server: http://localhost:3007Benchmarks run automatically on every push to main branch:
- Sets up all required environments (Node, Bun, Deno, Rust)
- Installs dependencies and builds projects
- Starts all servers concurrently
- Runs wrk and Lighthouse benchmarks
- Generates markdown reports
- Commits results to
reports/directory - Archives results as artifacts
You can manually trigger benchmarks from the GitHub Actions tab.
- Location:
reports/latest/index.md - Updated: On every commit to main
- Contents: Summary tables, detailed metrics, performance charts
- Location:
reports/history/YYYY-MM-DD/ - Retention: Permanent
- Format: Timestamped markdown files
Edit scripts/run-benchmarks.sh:
DURATION=30s # Test duration
THREADS=12 # Number of threads
CONNECTIONS=400 # Concurrent connections- Create new project directory
- Implement matching UI/backend
- Add to
FRAMEWORKSarray inrun-benchmarks.sh - Update GitHub Actions workflow
- Update this README
Expected baseline metrics:
| Framework | Requests/sec | Avg Latency | Performance Score |
|---|---|---|---|
| Tuono | 15000+ | < 10ms | 95+ |
| Bun | 12000+ | < 15ms | 90+ |
| Next.js | 8000+ | < 20ms | 90+ |
| Deno | 10000+ | < 15ms | 92+ |
| Astro CSR | 9000+ | < 18ms | 92+ |
| Astro SSR | 11000+ | < 16ms | 93+ |
| TanStack | 10000+ | < 17ms | 91+ |
| Askama | 14000+ | < 12ms | 94+ |
Actual results vary based on hardware and configuration
Each framework implements:
- Homepage: Root route with server-side data fetching
- API Endpoint:
/api/datareturning JSON - Static Assets: Favicon, logos (rust.svg, react.svg)
- Styles: Global CSS with animations
All frameworks render identical UI:
- Header with links to Crates.io and npm
- Large "TUONO" title
- Rotating Rust and React logos
- Subtitle from server-side data
- GitHub button link
This is a performance testing framework. Individual framework implementations follow their respective licenses.
To add benchmarks or improve the testing framework:
- Fork the repository
- Create a feature branch
- Make your changes
- Run benchmarks locally
- Submit a pull request
- Tuono Documentation
- Bun Documentation
- Next.js Documentation
- Deno Fresh Documentation
- wrk Documentation
- Lighthouse CI Documentation
- Always build in production mode
- Enable all optimizations
- Use caching strategies
- Configure CDN for static assets
- Monitor with real user metrics (RUM)
- Same hardware/environment
- Same UI complexity
- Same data payload size
- Multiple test runs
- Warm-up period before testing