0
Fork 0
mirror of https://github.com/oblien/openship.git synced 2026-11-18 06:55:56 +00:00
Commit graph

10 commits

Author SHA1 Message Date
Hydra de lerne
e19711e1c5
feat: add domain virtual responses with a compact editor (#1739)
* feat: add domain virtual responses with a compact editor and bounded edge matching

* fix: keep traffic working during rolling edge script updates

* refactor: centralize edge management transport
2026-11-12 21:20:24 +02:00
Hydra de lerne
86006cebfa
fix(analytics): wait for the first active deployment before reading traffic (#1640) 2026-11-06 19:17:17 +02:00
Hydra
20f71eb86b fix(analytics): share duration averaging and verify refresh consistency 2026-10-18 12:09:45 +03:00
Rudi
7fb0a5f847 fix(analytics): divide self-hosted response-time sums by request count
The edge stores server_analytics.response_time as the TOTAL response time of
each minute's requests: site_logger.lua adds every request's time to the
minute's `:t` counter and mgmt_api.lua returns that sum in seconds.

summariseBuckets and buildHourlyPeriods treated the value as a per-minute
average and multiplied it by `requests` again, so the dashboard's Avg Response
grew with traffic: a busy site averaging ~80 ms reported ~7 s. The CLI edge
traffic panel averaged the per-minute totals, which overstated it too.

Divide the summed time by total requests, matching the Cloud path
(response_time_sum / requests), and correct the schema comment that described
the column as an average.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:58:10 +00:00
Hydra
e8d9328f64 refactor(cloud): complete linked managed server execution and regression coverage 2026-10-02 19:18:10 +03:00
Hydra
ecbaad3994 update icon system, enhance backup 2026-09-25 13:53:12 +03:00
Hydra
3c35e5bad4 fix: enforce host and active deployment ownership 2026-09-16 09:23:02 +03:00
Hydra
6143f5805b ship sdk, intial scale panel 2026-09-14 01:34:59 +03:00
Hydra
5230af32d4 batch 0.5.5 2026-08-05 03:12:09 +03:00
shuvamk
90361e627b fix(api): weight self-hosted analytics avg response time by request count
`server_analytics.response_time` is a per-minute AVERAGE (documented in the
schema). `summariseBuckets` and `buildHourlyPeriods` averaged those per-minute
averages unweighted (÷ number of minute-buckets), so a period's
`avgResponseTimeMs` is skewed whenever minutes carry unequal traffic. The
OpenShip Cloud path already computes the correct request-weighted average
(`response_time_sum / requests`); the self-hosted path did not.

Example — two minutes in one period: 1 request at 1000ms, then 99 at 100ms.
Correct request-weighted average is (1·1000 + 99·100) / 100 = 109ms; the
unweighted mean reported 550ms.

Both self-hosted reducers now weight each minute by its request count and
divide by total requests (guarding zero-request periods against NaN, matching
the cloud path). Exported both pure functions and added
response-time-weighting.test.ts (verified failing before the fix, passing
after). Full `bun run test` green (6/6 turbo tasks); `bun run --cwd apps/api
lint` clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 11:08:35 +05:30