Skip to main content
Run performance benchmarks to compare AI SDK vs Native backends.

Quick Start

1

Simple Usage

2

With Configuration


Commands

Run All Benchmarks

Output:

Import Time Benchmark

Output:

Memory Benchmark

Latency Benchmark

Streaming Benchmark

Embedding Benchmark

Options

Examples

Quick Performance Check

Full Benchmark Suite

JSON Output

Compare Backends

CI/CD Integration

GitHub Actions

Script Integration

Interpreting Results

Import Time

  • < 50ms: Excellent
  • 50-100ms: Good
  • > 100ms: May need optimization

AI SDK Overhead

  • ~35ms: Expected overhead for AI SDK import
  • 0ms: AI SDK not loaded (lazy loading working)

Memory

  • < 5MB: Normal for Agent creation
  • > 10MB: May indicate memory leak

Latency

  • < 500ms: Good first-call latency
  • > 1000ms: Network or API issues

Troubleshooting

Benchmarks

SDK benchmark guide

AI SDK CLI

Backend CLI utilities