llm-usage-metrics 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -9
- package/dist/index.js +1473 -494
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -135,8 +135,7 @@ Efficiency reports are repo-attributed: usage events are mapped to a Git reposit
|
|
|
135
135
|
|
|
136
136
|
- `Commits`, `+Lines`, `-Lines`, `ΔLines` come from local Git shortstat outcomes (for your configured Git author).
|
|
137
137
|
- `Input`, `Output`, `Reasoning`, `Cache Read`, `Cache Write`, `Total`, and `Cost` come from repo-attributed usage events.
|
|
138
|
-
- `
|
|
139
|
-
- `Non-Cache/Commit` uses `(Input + Output + Reasoning) / Commits` and excludes cache read/write tokens.
|
|
138
|
+
- `Tokens/Commit` uses `(Input + Output + Reasoning) / Commits` and excludes cache read/write tokens.
|
|
140
139
|
- `$/Commit` uses `Cost / Commits`.
|
|
141
140
|
- `$/1k Lines` uses `Cost / (ΔLines / 1000)`.
|
|
142
141
|
- `Commits/$` uses `Commits / Cost` (shown only when `Cost > 0`).
|
|
@@ -291,12 +290,14 @@ pnpm run perf:production-benchmark -- \
|
|
|
291
290
|
|
|
292
291
|
### Environment Variables
|
|
293
292
|
|
|
294
|
-
| Variable | Description
|
|
295
|
-
| -------------------------------- |
|
|
296
|
-
| `LLM_USAGE_SKIP_UPDATE_CHECK` | Skip update check (`1`)
|
|
297
|
-
| `
|
|
298
|
-
| `
|
|
299
|
-
| `
|
|
293
|
+
| Variable | Description |
|
|
294
|
+
| -------------------------------- | ---------------------------------- |
|
|
295
|
+
| `LLM_USAGE_SKIP_UPDATE_CHECK` | Skip update check (`1`) |
|
|
296
|
+
| `LLM_USAGE_UPDATE_CACHE_SCOPE` | Update cache scope |
|
|
297
|
+
| `LLM_USAGE_PRICING_CACHE_TTL_MS` | Pricing cache duration |
|
|
298
|
+
| `LLM_USAGE_PARSE_MAX_PARALLEL` | Max parallel file parses (`1-64`) |
|
|
299
|
+
| `LLM_USAGE_PARSE_CACHE_ENABLED` | Enable parse cache (`1/0`) |
|
|
300
|
+
| `LLM_USAGE_PROFILE_RUNTIME` | Emit runtime profiling diagnostics |
|
|
300
301
|
|
|
301
302
|
Parse cache is source-sharded on disk (`parse-file-cache.<source>.json`) so source-scoped runs avoid loading unrelated cache blobs.
|
|
302
303
|
|
|
@@ -307,7 +308,9 @@ See full environment variable reference in the [documentation](https://ayagmar.g
|
|
|
307
308
|
The CLI performs lightweight update checks with smart defaults:
|
|
308
309
|
|
|
309
310
|
- 1-hour cache TTL
|
|
310
|
-
-
|
|
311
|
+
- Fresh cached update results are used immediately
|
|
312
|
+
- Stale or missing cache refreshes in the background instead of blocking report execution
|
|
313
|
+
- Skipped for `--help`, `--version`, `npx`, and direct source/development runs
|
|
311
314
|
- Prompts only in interactive TTY sessions
|
|
312
315
|
|
|
313
316
|
Disable with:
|