server: report how long bringup took, as a raw figure

A restart's cost is the one number a reader needs in order to decide whether one
is worth suffering, and any guess at it would decide the answer by itself. The
server knows it exactly: the interval from process start to the socket listening,
on this machine, with this model and this cache state.

Emitted on /stats as startup_s, 0 until the server has listened. Raw figure only
-- the page no longer consumes it. It is here because it is the missing half of
any restart decision a human or a tool makes downstream, and because the
decode-step advisory that did consume it was withdrawn the same day it shipped
(see the following commit for what the live data showed).

Trailing zero-defaulted field on both SchedMetrics structs plus the adapter copy;
neither struct is ABI-pinned, so this is the sanctioned append.

Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (xhigh) via Open WebUI

(cherry picked from commit 76a9e2f7a28b8e034cfd56caa091792c68fe19b6)
This commit is contained in:
Memoria (Noblistic) committed 2026-10-19 17:35:05 +00:00
1 parent ed2da8c9da
commit d4998b1f75
7 files changed
+53

No files matched your search

+3
View File
@@ -125,6 +125,9 @@ HttpResponse Server::handle_stats(const HttpRequest&) {
o["model"] = opt_.model_id;
o["version"] = opt_.version;
o["uptime_s"] = unix_now() - started_at_;
/* How long this process took to come up, measured on this machine: the price of a restart,
* which the page needs to say whether a restart pays back. 0 before the server listens. */
o["startup_s"] = startup_s_;
o["in_flight"] = in_flight_.load(std::memory_order_relaxed);
o["queue_cap"] = queue_depth_;
o["now_ms"] = (int64_t)std::time(nullptr) * 1000;