Metadata-Version: 2.4
Name: dynamo-benchmark
Version: 1.0.1
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Rust
Classifier: License :: Other/Proprietary License
Classifier: Environment :: Console
Classifier: Topic :: Software Development :: Testing
Summary: High-performance benchmark tool for DynamoDB-compatible databases
Keywords: dynamodb,benchmark,load-testing,performance,rust
Author-email: Benchmark User <user@example.com>
License: Proprietary
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# DynamoDB Benchmark Tool

High-performance benchmark tool for DynamoDB-compatible databases.

## Installation

```bash
pip install maturin
maturin develop --release
```

## Usage

```bash
dynamo-benchmark -e <endpoint> -ak <credentials> <table> <operation> <field>...
```

### Examples

```bash
# HTTPS
dynamo-benchmark -e "https://example.com:6379" -ak "user:pass" mytable PutItem \
    "pk:S:{Key uniform 10000}" "sk:S:{Key sequence 1000}" -c 64 -s 10

# HTTP (local)
dynamo-benchmark -e "http://127.0.0.1:7000" -ak "aurora:abc" MyTable PutItem \
    "pk:S:{Key uniform 10000}" -c 32 -s 5

# GetItem
dynamo-benchmark -e "https://example.com:6379" -ak "user:pass" mytable GetItem \
    "pk:S:{Key uniform 1000}" "sk:S:{Key uniform 100}" -c 32

# With QPS limit
dynamo-benchmark -e "https://example.com:6379" -ak "user:pass" mytable PutItem \
    "pk:S:{Key uniform 10000}" --qps 10000 -c 64

# Binary payload + timestamp
dynamo-benchmark -e "https://example.com:6379" -ak "user:pass" mytable PutItem \
    "pk:S:user_{Key uniform 1000}" "data:B:{Value 16}" "ttl:N:{Timestamp 86400}" -c 64
```

## Options

| Option | Description |
|--------|-------------|
| `-e, --endpoint-url` | Endpoint URL (http:// or https://) |
| `-ak` | Credentials: `user:password` |
| `-c, --connections` | Connections (default: cores × 16) |
| `-s, --seconds` | Duration in seconds (0 = unlimited) |
| `--qps` | Target QPS (0 = unlimited) |
| `--cores` | CPU cores: `0-3` or `0,2,4,6` |

## Field Specification

Format: `name:type:template`

**Types:** `S` (String), `N` (Number), `B` (Binary)

**Templates:**

| Template | Description |
|----------|-------------|
| `{Key uniform N}` | Random key in [0, N) |
| `{Key sequence N}` | Sequential: 0, 1, ..., N-1, 0, 1, ... |
| `{Value N}` | N bytes random binary (type B) |
| `{Timestamp N}` | Unix timestamp + N seconds (type N) |

**Examples:**

| Template | Field | Type | Example |
|----------|-------|------|---------|
| `{Key uniform 1000}` | pk | S | `00000000000003e8` |
| `user_{Key uniform 1000}` | pk | S | `user_00000000000003e8` |
| `{Value 16}` | data | B | `a3f2b1c8d4e5...` |
| `{Timestamp 86400}` | ttl | N | `1735689600` |

## Operations

| Operation | Description |
|-----------|-------------|
| `PutItem` | Write |
| `GetItem` | Read |

## License

MIT

