> Source: https://vitna.ai/docs/runtime/profile > Raw Markdown: https://vitna.ai/docs/runtime/profile.md > Corpus index: https://vitna.ai/llms.txt # Measuring your unit profile A unit profile is how many tokens one call on a lane actually consumes. It is the bridge between a published price and a cost per unit: input tokens per unit, multiplied by a price per million input tokens, is what one unit of that work costs at list. Your provider does not give you this number. The runtime already has it, because it wrote one line per request while it was serving. ```bash VITNA_LEDGER=/var/lib/vitna/ledger.jsonl vitna-runtime-profile ``` `vitna-runtime-profile` is on the path of any [install](installing.md) from 0.2.0; inside Vitna, from a checkout of its private repository, the same file runs as `npm run runtime:profile`. From the container it is the same binary behind a different entrypoint, reading the ledger volume you already mount: ```bash docker run --rm --entrypoint vitna-runtime-profile \ -e VITNA_LEDGER=/var/lib/vitna/ledger.jsonl \ -v "$PWD/ledger.jsonl:/var/lib/vitna/ledger.jsonl:ro" \ ghcr.io/convexityos/vitna-runtime:latest ``` ## What it prints ``` runtime-profile: /var/lib/vitna/ledger.jsonl 4812 of 4880 rows counted. This read one file and reached no network. lane deep-research window 2026-09-01T00:12:44.108Z .. 2026-09-09T23:41:02.550Z served 3104 units, and 11 failed, worth no units input 8214.62 tokens per unit, from 3104 served units (25498183 tokens) output 1120.4 tokens per unit, from 3104 served units (3477721 tokens) as flags --profile inputTokensPerUnit=8214.62 --profile outputTokensPerUnit=1120.4 ``` One block per lane. The window is the first and last served request the figure rests on, read off the rows themselves, so a lane that was quiet for a fortnight says so in its own dates. The token totals travel beside the rounded figure, so anybody holding this output can recompute it exactly. ## Nothing leaves the machine No account, no key, no database, no network. It reads the file your runtime writes and prints to your terminal, and it is worth running if you never speak to Vitna again. [Pushing the ledger](pushing.md) is a different command, opt-in and off by default, and this one neither calls it nor needs it to have been run. ## Nothing is estimated The rule the [ledger](ledger.md) keeps at row scale is kept here at aggregate scale. A provider that reported no token counts yields nulls: ``` lane classification-and-lookups window 2026-09-02T12:00:00.000Z .. 2026-09-09T18:22:11.000Z served 902 units input not measured: the provider reported no inputTokens on any served unit here output not measured: the provider reported no outputTokens on any served unit here as flags none, because nothing here was measured; a profile is not entered from an absence ``` Not zero, which would price the lane as free. Not a plausible figure borrowed from a sku that does report. **The denominator is the units that reported, not the units that ran.** A window where half the serves carried a count and half did not would otherwise measure at half its true rate, so the two numbers are kept apart and both are printed: ``` input 1000 tokens per unit, from 2 of 4 served units, the rest reporting no count (2000 tokens) ``` **A refusal and a failure are worth no units.** They are counted beside the profile, because a lane that failed often and a lane that ran little are the same shape otherwise, and they do not widen the window, because a profile measured over requests that produced nothing would describe a busier lane than you have. ## What it does not separate | Not separated | Why, and what to do about it | |---|---| | Cached input | Neither dialect reports the cached share of a prompt, so `inputTokensPerUnit` is every input token. A lane whose provider bills cache reads at their own rate is not fully described by it, and `cachedInputTokensPerUnit` is emitted not at all rather than as a zero | | Units that are not calls | One unit here is one served request. A workload whose unit is a document that takes three calls has a profile three times this one, and no ledger row knows that | | Two tokenizers | A lane that failed over, or that carries a promoted [rule](../routing/rules.md), spent its window across more than one sku, and the same prompt is a different number of tokens at each. The per-sku split prints under any lane that served more than one | ## Passthrough is measured and is not a lane A model name sent without the `vitna/` prefix is [passed through untouched](serving.md) and marked unrouted. It is still your traffic, so it is measured and grouped by the model that was asked for, under a heading that says it is not a lane. No `--profile` flags are offered for it: nothing in the record chose it, so there is no workload it could be a profile of. ## Narrowing it | Flag | What it does | |---|---| | `--file <path>` | The ledger to read, if you would rather not set `VITNA_LEDGER` | | `--window <a..b>` | Two calendar days, inclusive, spelled as [`aperture:usage:import`](../routing/usage-import.md) spells one | | `--lane <alias>` | One lane. Every other row is reported as another lane's rather than dropped | | `--json` | The same measurement as JSON on stdout, to keep rather than to read | ```bash vitna-runtime-profile --window 2026-09-01..2026-09-09 --lane deep-research ``` Whatever a run leaves out is printed per reason: rows outside the window, rows belonging to another lane, rows carrying no usable timestamp, and a truncated final line, which is the ordinary shape of an append-only file being read while it is written. ## Entering one is a separate act The `as flags` line is the fragment [`aperture:workload:edit`](../cli/aperture/workloads.md) takes. Typing it is somebody's decision, made at a prompt, against a register that is not on this machine. This command prints it and does nothing with it, which is the same division [pushing](pushing.md) keeps: the measurement is yours, and moving it is an act with a person behind it. Teams already running LiteLLM or OpenRouter can pair `vitna-runtime-profile` with the [LiteLLM cost map](../api/v1/prices/litellm-cost-map.md), [CI evaluation evidence](../api/v1/engine/org-evidence.md) (Promptfoo, Braintrust, Inspect AI), and [gateway adapters](../routing/adapters.md) without replacing their production proxy first: see the [three-minute gateway quickstart](../quickstart.md#three-minute-gateway-quickstart-litellm-and-openrouter).