---
nav_title: CLI benchmarks
parent: Reference
nav_order: 50
---
# CLI benchmarks
Numbers are produced by `cargo benchmarks cli`. Measures the `lemma` binary and in-process engine wrappers used by the CLI.
## Methodology
### HTTP evaluate (`http_evaluate`)
- Spawns `lemma server --prefix cli/documentation/examples` on `127.0.0.1:19877` once per Criterion group.
- Each iteration: blocking `reqwest` POST with `application/x-www-form-urlencoded` body (coffee order, library fees, Dutch net salary) or GET for show-only retrieval.
- Examples loaded from [`cli/documentation/examples`](https://github.com/lemma/lemma/tree/e8d8687f11bcff28455be5abb7d0926ccb24e601/cli/documentation/examples).
- Latency: Criterion (3s warmup, 10s measurement for evaluate group, 5s for show). Median and standard deviation reported.
### Engine profile (`engine_profile`)
- In-process: loads all `.lemma` files from `cli/documentation/examples` into one `Engine`.
- Fixture: Dutch net salary (`net_salary`) with `gross_salary=5000 eur`, `pay_period=month`, `income_source=employment`, `pension_contribution=150 eur`, `payroll_tax_credit=true`; effective is `DateTimeValue::now()` per iteration setup.
- Breakdown benches isolate evaluate, overlay resolve, single-rule run, and JSON serialization paths.
- Latency: Criterion (3s warmup, 5s measurement). Median and standard deviation reported.
## Environment
- Host: `Linux 7.0.0-28-generic x86_64`
- Lemma git SHA: `e8d8687f11bcff28455be5abb7d0926ccb24e601`
- Rustc:
```
rustc 1.92.0 (ded5c06cf 2025-12-08)
binary: rustc
commit-hash: ded5c06cf21d2b93bffd5d884aa6e96934ee4234
commit-date: 2025-12-08
host: x86_64-unknown-linux-gnu
release: 1.92.0
LLVM version: 21.1.3
```
## HTTP evaluate latency
| POST `/coffee_order` | 333.51 us | 32.47 us |
| POST `/library_fees` | 176.04 us | 29.50 us |
| POST `/net_salary` | 718.43 us | 45.43 us |
| GET `/net_salary` (show only) | 194.70 us | 16.89 us |
## Engine profile latency (Dutch net salary)
| Full `Engine::run` | 430.76 us | 23.69 us |
| Single-rule evaluate (`periods_per_year`) | 24.60 us | 1.75 us |
| Envelope JSON serialize | 20.94 us | 2.23 us |
| Raw response JSON serialize | 2.72 us | 280 ns |