summaryrefslogtreecommitdiffhomepage
path: root/packages/host-bin/package.json
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 /packages/host-bin/package.json
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 'packages/host-bin/package.json')
-rw-r--r--packages/host-bin/package.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/host-bin/package.json b/packages/host-bin/package.json
index 65e986d..ccaddd2 100644
--- a/packages/host-bin/package.json
+++ b/packages/host-bin/package.json
@@ -11,6 +11,7 @@
"@dispatch/credential-store": "workspace:*",
"@dispatch/provider-openai-compat": "workspace:*",
"@dispatch/session-orchestrator": "workspace:*",
+ "@dispatch/throughput-store": "workspace:*",
"@dispatch/transport-http": "workspace:*",
"@dispatch/tool-read-file": "workspace:*",
"@dispatch/journal-sink": "workspace:*",