# Dual-Server Endpoint Latency Benchmark Report

- Generated (UTC): `2026-06-18T01:52:23.176238607+00:00`
- Iterations per endpoint: `20`
- Warmup iterations per endpoint: `3`
- Suite repeats per endpoint: `3`
- Rust server: in-process Axum router (`/api/auth/*`)
- Athena Auth Argon2 profile: `memory_cost=1024`, `time_cost=2`, `parallelism=1` (Athena Auth default)
- Reference server: Node `better-auth` compatibility server (`http://localhost:3100`)
- Raw JSON artifact: `compat-tests/reports/dual-server-latency-report.json`
- HTML dashboard target: `compat-tests/reports/dual-server-latency-report.html`

## Endpoint Map

- `E1` = GET /ok
- `E2` = POST /sign-up/email
- `E3` = POST /sign-in/email
- `E4` = GET /get-session
- `E5` = GET /list-sessions
- `E6` = GET /list-accounts
- `E7` = POST /update-user
- `E8` = POST /change-password
- `E9` = POST /revoke-session
- `E10` = POST /revoke-sessions
- `E11` = POST /revoke-other-sessions
- `E12` = POST /sign-out
- `E13` = POST /change-email
- `E14` = POST /delete-user

## Summary

- Feasible endpoints benchmarked: `14`
- Endpoints with no successful runs: `0`
- Successful endpoint runs: `42`

## Mermaid Charts

### Average Latency by Endpoint
Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "Average Latency (ms): Athena Auth vs Better Auth (Lower is better)"
    x-axis "Endpoint" ["E1", "E2", "E3", "E4", "E5", "E6", "E7", "E8", "E9", "E10", "E11", "E12", "E13", "E14"]
    y-axis "Milliseconds" 0 --> 197
    bar "Athena Auth" [0.318, 16.225, 16.372, 0.859, 0.822, 0.701, 0.821, 31.565, 0.716, 0.908, 0.847, 0.713, 0.837, 0.751]
    bar "Better Auth" [1.351, 76.066, 75.396, 2.222, 2.372, 2.404, 3.255, 149.968, 2.359, 3.274, 2.599, 1.954, 2.902, 2.773]
```

### Average Delta by Endpoint (Rust - Reference)
Lower is better. Negative indigo bars mean Athena Auth is faster; values closer to zero are less favorable.

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5"}}}}%%
xychart-beta
    title "Average Delta (ms): Athena Auth minus Better Auth (Lower is better)"
    x-axis "Endpoint" ["E1", "E2", "E3", "E4", "E5", "E6", "E7", "E8", "E9", "E10", "E11", "E12", "E13", "E14"]
    y-axis "Milliseconds" -119 --> 0
    bar "Delta" [-1.034, -59.841, -59.024, -1.364, -1.550, -1.703, -2.434, -118.402, -1.643, -2.366, -1.752, -1.241, -2.065, -2.022]
```

## Detailed Results

| ID | Endpoint | Runs OK/Total | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Rust p95 ms | Ref p95 ms | Rust Statuses | Ref Statuses |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | --- | --- |
| E1 | GET /ok | 3/3 | 60 | 0.318 | 1.351 | -1.034 | 0.404 | 2.071 | `200:60` | `200:60` |
| E2 | POST /sign-up/email | 3/3 | 60 | 16.225 | 76.066 | -59.841 | 17.140 | 82.258 | `200:60` | `200:60` |
| E3 | POST /sign-in/email | 3/3 | 60 | 16.372 | 75.396 | -59.024 | 17.210 | 79.044 | `200:60` | `200:60` |
| E4 | GET /get-session | 3/3 | 60 | 0.859 | 2.222 | -1.364 | 1.104 | 3.501 | `200:60` | `200:60` |
| E5 | GET /list-sessions | 3/3 | 60 | 0.822 | 2.372 | -1.550 | 1.096 | 3.519 | `200:60` | `200:60` |
| E6 | GET /list-accounts | 3/3 | 60 | 0.701 | 2.404 | -1.703 | 0.850 | 3.429 | `200:60` | `200:60` |
| E7 | POST /update-user | 3/3 | 60 | 0.821 | 3.255 | -2.434 | 1.049 | 5.228 | `200:60` | `200:60` |
| E8 | POST /change-password | 3/3 | 60 | 31.565 | 149.968 | -118.402 | 32.906 | 158.245 | `200:60` | `200:60` |
| E9 | POST /revoke-session | 3/3 | 60 | 0.716 | 2.359 | -1.643 | 0.972 | 3.032 | `200:60` | `200:60` |
| E10 | POST /revoke-sessions | 3/3 | 60 | 0.908 | 3.274 | -2.366 | 1.211 | 8.940 | `200:60` | `200:60` |
| E11 | POST /revoke-other-sessions | 3/3 | 60 | 0.847 | 2.599 | -1.752 | 1.107 | 3.484 | `200:60` | `200:60` |
| E12 | POST /sign-out | 3/3 | 60 | 0.713 | 1.954 | -1.241 | 0.955 | 2.617 | `200:60` | `200:60` |
| E13 | POST /change-email | 3/3 | 60 | 0.837 | 2.902 | -2.065 | 1.094 | 4.378 | `200:60` | `200:60` |
| E14 | POST /delete-user | 3/3 | 60 | 0.751 | 2.773 | -2.022 | 0.930 | 3.817 | `200:60` | `200:60` |

### E1 GET /ok

- Successful runs: `3/3`
- Rust: avg `0.318` ms, p50 `0.305` ms, p95 `0.404` ms, min `0.231` ms, max `0.557` ms
- Reference: avg `1.351` ms, p50 `1.215` ms, p95 `2.071` ms, min `0.984` ms, max `3.018` ms
- Delta (Rust - Reference): `-1.034` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.318 | 1.558 | -1.240 | ok |
| 2 | 20 | 0.299 | 1.150 | -0.851 | ok |
| 3 | 20 | 0.336 | 1.345 | -1.009 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E1 GET /ok latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 10
    bar "Athena Auth" [0.318, 0.305, 0.404]
    bar "Better Auth" [1.351, 1.215, 2.071]
```

### E2 POST /sign-up/email

- Successful runs: `3/3`
- Rust: avg `16.225` ms, p50 `16.077` ms, p95 `17.140` ms, min `15.598` ms, max `20.066` ms
- Reference: avg `76.066` ms, p50 `75.293` ms, p95 `82.258` ms, min `71.824` ms, max `92.250` ms
- Delta (Rust - Reference): `-59.841` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 16.021 | 76.867 | -60.846 | ok |
| 2 | 20 | 16.624 | 77.004 | -60.379 | ok |
| 3 | 20 | 16.030 | 74.328 | -58.298 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E2 POST /sign-up/email latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 111
    bar "Athena Auth" [16.225, 16.077, 17.140]
    bar "Better Auth" [76.066, 75.293, 82.258]
```

### E3 POST /sign-in/email

- Successful runs: `3/3`
- Rust: avg `16.372` ms, p50 `16.229` ms, p95 `17.210` ms, min `15.653` ms, max `19.178` ms
- Reference: avg `75.396` ms, p50 `74.893` ms, p95 `79.044` ms, min `70.878` ms, max `95.536` ms
- Delta (Rust - Reference): `-59.024` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 16.398 | 76.517 | -60.119 | ok |
| 2 | 20 | 16.345 | 74.882 | -58.536 | ok |
| 3 | 20 | 16.371 | 74.788 | -58.416 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E3 POST /sign-in/email latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 115
    bar "Athena Auth" [16.372, 16.229, 17.210]
    bar "Better Auth" [75.396, 74.893, 79.044]
```

### E4 GET /get-session

- Successful runs: `3/3`
- Rust: avg `0.859` ms, p50 `0.845` ms, p95 `1.104` ms, min `0.616` ms, max `1.197` ms
- Reference: avg `2.222` ms, p50 `1.938` ms, p95 `3.501` ms, min `1.662` ms, max `6.590` ms
- Delta (Rust - Reference): `-1.364` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.816 | 1.919 | -1.103 | ok |
| 2 | 20 | 0.915 | 2.763 | -1.848 | ok |
| 3 | 20 | 0.846 | 1.986 | -1.140 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E4 GET /get-session latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 10
    bar "Athena Auth" [0.859, 0.845, 1.104]
    bar "Better Auth" [2.222, 1.938, 3.501]
```

### E5 GET /list-sessions

- Successful runs: `3/3`
- Rust: avg `0.822` ms, p50 `0.790` ms, p95 `1.096` ms, min `0.633` ms, max `1.338` ms
- Reference: avg `2.372` ms, p50 `2.171` ms, p95 `3.519` ms, min `1.826` ms, max `5.085` ms
- Delta (Rust - Reference): `-1.550` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.783 | 2.463 | -1.680 | ok |
| 2 | 20 | 0.866 | 2.447 | -1.581 | ok |
| 3 | 20 | 0.817 | 2.206 | -1.389 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E5 GET /list-sessions latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 10
    bar "Athena Auth" [0.822, 0.790, 1.096]
    bar "Better Auth" [2.372, 2.171, 3.519]
```

### E6 GET /list-accounts

- Successful runs: `3/3`
- Rust: avg `0.701` ms, p50 `0.714` ms, p95 `0.850` ms, min `0.522` ms, max `1.009` ms
- Reference: avg `2.404` ms, p50 `2.278` ms, p95 `3.429` ms, min `1.670` ms, max `4.209` ms
- Delta (Rust - Reference): `-1.703` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.675 | 2.574 | -1.898 | ok |
| 2 | 20 | 0.707 | 2.213 | -1.506 | ok |
| 3 | 20 | 0.720 | 2.425 | -1.705 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E6 GET /list-accounts latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 10
    bar "Athena Auth" [0.701, 0.714, 0.850]
    bar "Better Auth" [2.404, 2.278, 3.429]
```

### E7 POST /update-user

- Successful runs: `3/3`
- Rust: avg `0.821` ms, p50 `0.803` ms, p95 `1.049` ms, min `0.652` ms, max `1.268` ms
- Reference: avg `3.255` ms, p50 `2.712` ms, p95 `5.228` ms, min `2.031` ms, max `6.393` ms
- Delta (Rust - Reference): `-2.434` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.875 | 3.760 | -2.885 | ok |
| 2 | 20 | 0.804 | 3.018 | -2.214 | ok |
| 3 | 20 | 0.785 | 2.987 | -2.202 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E7 POST /update-user latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 10
    bar "Athena Auth" [0.821, 0.803, 1.049]
    bar "Better Auth" [3.255, 2.712, 5.228]
```

### E8 POST /change-password

- Successful runs: `3/3`
- Rust: avg `31.565` ms, p50 `31.107` ms, p95 `32.906` ms, min `29.919` ms, max `47.644` ms
- Reference: avg `149.968` ms, p50 `149.235` ms, p95 `158.245` ms, min `143.825` ms, max `163.812` ms
- Delta (Rust - Reference): `-118.402` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 32.251 | 150.546 | -118.295 | ok |
| 2 | 20 | 31.244 | 149.779 | -118.535 | ok |
| 3 | 20 | 31.201 | 149.578 | -118.377 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E8 POST /change-password latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 197
    bar "Athena Auth" [31.565, 31.107, 32.906]
    bar "Better Auth" [149.968, 149.235, 158.245]
```

### E9 POST /revoke-session

- Successful runs: `3/3`
- Rust: avg `0.716` ms, p50 `0.709` ms, p95 `0.972` ms, min `0.542` ms, max `1.105` ms
- Reference: avg `2.359` ms, p50 `2.265` ms, p95 `3.032` ms, min `1.951` ms, max `3.955` ms
- Delta (Rust - Reference): `-1.643` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.701 | 2.375 | -1.674 | ok |
| 2 | 20 | 0.749 | 2.398 | -1.648 | ok |
| 3 | 20 | 0.698 | 2.305 | -1.607 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E9 POST /revoke-session latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 10
    bar "Athena Auth" [0.716, 0.709, 0.972]
    bar "Better Auth" [2.359, 2.265, 3.032]
```

### E10 POST /revoke-sessions

- Successful runs: `3/3`
- Rust: avg `0.908` ms, p50 `0.889` ms, p95 `1.211` ms, min `0.677` ms, max `1.561` ms
- Reference: avg `3.274` ms, p50 `2.380` ms, p95 `8.940` ms, min `1.894` ms, max `17.421` ms
- Delta (Rust - Reference): `-2.366` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.918 | 5.000 | -4.082 | ok |
| 2 | 20 | 0.952 | 2.523 | -1.571 | ok |
| 3 | 20 | 0.856 | 2.299 | -1.444 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E10 POST /revoke-sessions latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 21
    bar "Athena Auth" [0.908, 0.889, 1.211]
    bar "Better Auth" [3.274, 2.380, 8.940]
```

### E11 POST /revoke-other-sessions

- Successful runs: `3/3`
- Rust: avg `0.847` ms, p50 `0.780` ms, p95 `1.107` ms, min `0.649` ms, max `1.289` ms
- Reference: avg `2.599` ms, p50 `2.449` ms, p95 `3.484` ms, min `2.002` ms, max `4.100` ms
- Delta (Rust - Reference): `-1.752` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.869 | 2.556 | -1.687 | ok |
| 2 | 20 | 0.809 | 2.573 | -1.764 | ok |
| 3 | 20 | 0.863 | 2.669 | -1.806 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E11 POST /revoke-other-sessions latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 10
    bar "Athena Auth" [0.847, 0.780, 1.107]
    bar "Better Auth" [2.599, 2.449, 3.484]
```

### E12 POST /sign-out

- Successful runs: `3/3`
- Rust: avg `0.713` ms, p50 `0.667` ms, p95 `0.955` ms, min `0.547` ms, max `1.002` ms
- Reference: avg `1.954` ms, p50 `1.871` ms, p95 `2.617` ms, min `1.480` ms, max `3.811` ms
- Delta (Rust - Reference): `-1.241` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.718 | 1.949 | -1.232 | ok |
| 2 | 20 | 0.744 | 2.020 | -1.276 | ok |
| 3 | 20 | 0.678 | 1.893 | -1.215 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E12 POST /sign-out latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 10
    bar "Athena Auth" [0.713, 0.667, 0.955]
    bar "Better Auth" [1.954, 1.871, 2.617]
```

### E13 POST /change-email

- Successful runs: `3/3`
- Rust: avg `0.837` ms, p50 `0.784` ms, p95 `1.094` ms, min `0.654` ms, max `1.422` ms
- Reference: avg `2.902` ms, p50 `2.562` ms, p95 `4.378` ms, min `1.927` ms, max `5.773` ms
- Delta (Rust - Reference): `-2.065` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.814 | 3.016 | -2.202 | ok |
| 2 | 20 | 0.817 | 2.749 | -1.931 | ok |
| 3 | 20 | 0.879 | 2.941 | -2.062 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E13 POST /change-email latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 10
    bar "Athena Auth" [0.837, 0.784, 1.094]
    bar "Better Auth" [2.902, 2.562, 4.378]
```

### E14 POST /delete-user

- Successful runs: `3/3`
- Rust: avg `0.751` ms, p50 `0.730` ms, p95 `0.930` ms, min `0.619` ms, max `1.207` ms
- Reference: avg `2.773` ms, p50 `2.673` ms, p95 `3.817` ms, min `2.121` ms, max `4.470` ms
- Delta (Rust - Reference): `-2.022` ms
- Lower is better. Athena Auth bars are indigo; Better Auth bars are light orange.

| Run | Samples | Rust Avg ms | Ref Avg ms | Delta ms | Notes |
| --- | ---: | ---: | ---: | ---: | --- |
| 1 | 20 | 0.729 | 2.808 | -2.079 | ok |
| 2 | 20 | 0.773 | 2.598 | -1.825 | ok |
| 3 | 20 | 0.752 | 2.913 | -2.161 | ok |

```mermaid
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#3440D5, #FDBA74"}}}}%%
xychart-beta
    title "E14 POST /delete-user latency profile (ms, Lower is better)"
    x-axis "Statistic" ["avg", "p50", "p95"]
    y-axis "Milliseconds" 0 --> 10
    bar "Athena Auth" [0.751, 0.730, 0.930]
    bar "Better Auth" [2.773, 2.673, 3.817]
```

