> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Performance CLI

> CLI commands for performance benchmarking and regression testing

# Performance CLI

Commands for measuring and verifying performance of PraisonAI Agents.

## Commands

### Full Benchmark

Run a complete performance benchmark:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai perf benchmark
```

**Output:**

```
============================================================
PraisonAI Agents Performance Benchmark
============================================================

[1/3] Measuring import time...
      Median: 18.4ms [PASS]

[2/3] Measuring memory usage...
      Current: 33.0MB [WARN]

[3/3] Checking lazy imports...
      All lazy: True [PASS]
        ✓ litellm
        ✓ chromadb
        ✓ mem0
        ✓ requests

============================================================
Overall: [PASS]
============================================================
```

### Import Time Only

Measure just the import time:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai perf import-time
```

**Output:**

```
Import time: 18.4ms (median)
Target: <200ms
Status: PASS
```

### Memory Usage Only

Measure just the memory usage:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai perf memory
```

**Output:**

```
Memory: 33.0MB
Target: <30MB
Status: WARN
```

### Lazy Import Check

Verify lazy imports are working:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai perf lazy-check
```

**Output:**

```
Lazy Import Check:
  litellm: LAZY (good)
  chromadb: LAZY (good)
  mem0: LAZY (good)
  requests: LAZY (good)
```

### Regression Check

Run a pass/fail check for CI/CD:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai perf check
```

Returns exit code 0 on pass, 1 on fail.

## Performance Targets

| Metric       | Target          | Hard Fail          |
| ------------ | --------------- | ------------------ |
| Import Time  | less than 200ms | greater than 300ms |
| Memory Usage | less than 30MB  | greater than 45MB  |
| Lazy Imports | All lazy        | Any eager          |

## CI/CD Integration

Use in GitHub Actions:

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
- name: Performance Check
  run: |
    pip install praisonaiagents
    praisonai perf check
```

Use in shell scripts:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
#!/bin/bash
if praisonai perf check; then
    echo "Performance check passed"
else
    echo "Performance regression detected"
    exit 1
fi
```

## Subcommands Reference

| Command                      | Description               |
| ---------------------------- | ------------------------- |
| `praisonai perf benchmark`   | Run full benchmark suite  |
| `praisonai perf import-time` | Measure import time only  |
| `praisonai perf memory`      | Measure memory usage only |
| `praisonai perf lazy-check`  | Verify lazy imports       |
| `praisonai perf check`       | CI/CD regression check    |

## Related

* [Performance Benchmarks (Code)](/docs/features/performance-benchmarks)
* [Lazy Imports](/docs/features/lazy-imports)
* [Lazy Imports CLI](/docs/cli/lazy-imports)
