summaryrefslogtreecommitdiffhomepage
path: root/bun.lock
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-10 10:16:20 +0900
committerAdam Malczewski <[email protected]>2026-06-10 10:16:20 +0900
commit80e14ab59732aabbf06035d13138500f133e921d (patch)
treebe3c1c118ceeb207d7ff218aa5d7ace06e683710 /bun.lock
parent5ff460688519e48fd0bfab893ebaed4258dee789 (diff)
downloaddispatch-80e14ab59732aabbf06035d13138500f133e921d.tar.gz
dispatch-80e14ab59732aabbf06035d13138500f133e921d.zip
feat: per-model throughput (tok/s) tracking + metrics endpoint
New throughput-store extension records one token-weighted sample per turn (model, output tokens, pure generation time = Σ step genTotalMs) into a day-bucketed KV store, and aggregates per-model tok/s = Σtokens / Σgen-seconds over a day/week/month (server-local boundaries; week = ISO Mon–Sun). transport-http records a sample per turn (logged) and serves GET /metrics/throughput?period=day|week|month&date=<...>. The response is typed as transport-contract's ThroughputResponse, so store/wire drift is a compile error. Pure period + aggregate logic fully unit-tested.
Diffstat (limited to 'bun.lock')
-rw-r--r--bun.lock15
1 files changed, 13 insertions, 2 deletions
diff --git a/bun.lock b/bun.lock
index bc33ba7..5911ffd 100644
--- a/bun.lock
+++ b/bun.lock
@@ -54,6 +54,7 @@
"@dispatch/storage-sqlite": "workspace:*",
"@dispatch/surface-loaded-extensions": "workspace:*",
"@dispatch/surface-registry": "workspace:*",
+ "@dispatch/throughput-store": "workspace:*",
"@dispatch/tool-read-file": "workspace:*",
"@dispatch/transport-http": "workspace:*",
"@dispatch/transport-ws": "workspace:*",
@@ -122,6 +123,13 @@
"@dispatch/ui-contract": "workspace:*",
},
},
+ "packages/throughput-store": {
+ "name": "@dispatch/throughput-store",
+ "version": "0.0.0",
+ "dependencies": {
+ "@dispatch/kernel": "workspace:*",
+ },
+ },
"packages/tool-read-file": {
"name": "@dispatch/tool-read-file",
"version": "0.0.0",
@@ -142,7 +150,7 @@
},
"packages/transport-contract": {
"name": "@dispatch/transport-contract",
- "version": "0.1.0",
+ "version": "0.4.0",
"dependencies": {
"@dispatch/ui-contract": "workspace:*",
"@dispatch/wire": "workspace:*",
@@ -156,6 +164,7 @@
"@dispatch/credential-store": "workspace:*",
"@dispatch/kernel": "workspace:*",
"@dispatch/session-orchestrator": "workspace:*",
+ "@dispatch/throughput-store": "workspace:*",
"@dispatch/transport-contract": "workspace:*",
"hono": "^4.0.0",
},
@@ -177,7 +186,7 @@
},
"packages/wire": {
"name": "@dispatch/wire",
- "version": "0.1.0",
+ "version": "0.4.0",
},
},
"packages": {
@@ -225,6 +234,8 @@
"@dispatch/surface-registry": ["@dispatch/surface-registry@workspace:packages/surface-registry"],
+ "@dispatch/throughput-store": ["@dispatch/throughput-store@workspace:packages/throughput-store"],
+
"@dispatch/tool-read-file": ["@dispatch/tool-read-file@workspace:packages/tool-read-file"],
"@dispatch/trace-replay": ["@dispatch/trace-replay@workspace:packages/trace-replay"],