@oh-my-pi/omp-stats 18.13.2 → 18.14.0
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/CHANGELOG.md +16 -0
- package/README.md +18 -18
- package/dist/client/index.js +78 -78
- package/dist/types/chunked-insert.d.ts +32 -0
- package/dist/types/client/traces/SpanDrawer.d.ts +9 -3
- package/dist/types/client/traces/TimelineCanvas.d.ts +3 -1
- package/dist/types/client/traces/TraceView.d.ts +13 -0
- package/dist/types/client/traces/index.d.ts +5 -0
- package/dist/types/client/traces/trace-colors.d.ts +3 -1
- package/dist/types/client/ui/SearchInput.d.ts +2 -1
- package/dist/types/db.d.ts +5 -5
- package/dist/types/port-conflict.d.ts +9 -3
- package/dist/types/server.d.ts +7 -3
- package/dist/types/shared-types.d.ts +3 -2
- package/dist/types/trace.d.ts +27 -1
- package/dist/types/types.d.ts +6 -1
- package/package.json +11 -6
- package/src/chunked-insert.ts +89 -0
- package/src/client/traces/SpanDrawer.tsx +56 -9
- package/src/client/traces/TimelineCanvas.tsx +13 -4
- package/src/client/traces/TraceView.tsx +165 -158
- package/src/client/traces/index.ts +5 -0
- package/src/client/traces/trace-colors.ts +14 -10
- package/src/client/ui/SearchInput.tsx +3 -1
- package/src/db.ts +197 -147
- package/src/parser.ts +13 -2
- package/src/port-conflict.ts +67 -30
- package/src/server.ts +39 -31
- package/src/shared-types.ts +3 -2
- package/src/trace.ts +119 -35
- package/src/types.ts +6 -1
- package/THIRD-PARTY-NOTICES.txt +0 -22901
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.14.0] - 2026-10-29
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Improved `omp stats` session synchronization performance by approximately 2–5× on large histories. The first sync after upgrading may take up to a minute while the stats database is optimized.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Fixed `/stats` and `omp stats` failing when another dashboard was syncing sessions or the configured port was already in use; busy dashboards are now reused, and a free port is selected when necessary.
|
|
14
|
+
|
|
15
|
+
## [18.13.3] - 2026-10-28
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Updated Bun engine requirement to ≥1.4.4
|
|
20
|
+
|
|
5
21
|
## [18.12.0] - 2026-10-17
|
|
6
22
|
|
|
7
23
|
### Fixed
|
package/README.md
CHANGED
|
@@ -11,15 +11,15 @@ Local observability dashboard for AI usage statistics.
|
|
|
11
11
|
|
|
12
12
|
## Metrics Tracked
|
|
13
13
|
|
|
14
|
-
| Metric
|
|
15
|
-
|
|
16
|
-
| Tokens/s
|
|
17
|
-
| Cache Rate
|
|
18
|
-
| Cache Savings
|
|
19
|
-
| Error Rate
|
|
20
|
-
| API-equivalent estimate | Sum of token usage priced with the matching public API rate card
|
|
21
|
-
| Avg Latency
|
|
22
|
-
| TTFT
|
|
14
|
+
| Metric | Calculation |
|
|
15
|
+
| ----------------------- | -------------------------------------------------------------------------- |
|
|
16
|
+
| Tokens/s | `output_tokens / (duration / 1000)` |
|
|
17
|
+
| Cache Rate | `cache_read / (input + cache_read) * 100` |
|
|
18
|
+
| Cache Savings | `(uncached prompt cost - actual prompt cost) / uncached prompt cost * 100` |
|
|
19
|
+
| Error Rate | `count(stopReason=error) / total_calls * 100` |
|
|
20
|
+
| API-equivalent estimate | Sum of token usage priced with the matching public API rate card |
|
|
21
|
+
| Avg Latency | Mean of `duration` |
|
|
22
|
+
| TTFT | Mean of `ttft` (time to first token) |
|
|
23
23
|
|
|
24
24
|
Subscription-backed models use matching public API prices when an exact public model exists; these values estimate API-equivalent usage rather than the user's bill. Subscription-only models without a public price are reported as N/A and excluded from dollar totals.
|
|
25
25
|
|
|
@@ -57,15 +57,15 @@ console.log(stats.byModel[0].avgTokensPerSecond);
|
|
|
57
57
|
|
|
58
58
|
## API Endpoints
|
|
59
59
|
|
|
60
|
-
| Endpoint
|
|
61
|
-
|
|
62
|
-
| `GET /api/stats`
|
|
63
|
-
| `GET /api/stats/models`
|
|
64
|
-
| `GET /api/stats/folders`
|
|
65
|
-
| `GET /api/stats/timeseries` | Hourly time series data
|
|
66
|
-
| `GET /api/events`
|
|
67
|
-
| `GET /api/status`
|
|
68
|
-
| `POST /api/sync`
|
|
60
|
+
| Endpoint | Description |
|
|
61
|
+
| --------------------------- | -------------------------------------------------------------------- |
|
|
62
|
+
| `GET /api/stats` | Overall stats with all breakdowns |
|
|
63
|
+
| `GET /api/stats/models` | Per-model statistics |
|
|
64
|
+
| `GET /api/stats/folders` | Per-folder/project statistics |
|
|
65
|
+
| `GET /api/stats/timeseries` | Hourly time series data |
|
|
66
|
+
| `GET /api/events` | Server-sent live status: sync progress, data version, rollup backlog |
|
|
67
|
+
| `GET /api/status` | Current live status (same shape as the events) |
|
|
68
|
+
| `POST /api/sync` | Start a background sync; progress arrives on `/api/events` |
|
|
69
69
|
|
|
70
70
|
## Data Storage
|
|
71
71
|
|