From 9da5a2047dbc2b14f22f67c11c46b8c0746a9b02 Mon Sep 17 00:00:00 2001 From: T-Crypt <132922589+T-Crypt@users.noreply.github.com> Date: Fri, 13 Nov 2026 00:03:33 -0700 Subject: [PATCH] feat(status): show every engine's window in berth status and the harbor berth status gains a SCHEDULE table and the harbor a SCHEDULES panel: each engine that has a window, its hours, whether they are open, and how long until they close or open, read on the node's clock. An engine shows before its window opens, and a berth run --window lease shows its own hours. The status JSON carries the rows as schedules, and each lease its window. --- CHANGELOG.md | 4 ++++ docs/leasing.md | 5 +++-- internal/broker/status.go | 1 + internal/broker/window_test.go | 16 ++++++++++++++ internal/cli/daemon.go | 6 +++++- internal/cli/status.go | 10 +++++++++ internal/cli/status_test.go | 23 ++++++++++++++++++++ internal/harbor/web/demo.json | 4 ++++ internal/harbor/web/harbor.css | 4 ++++ internal/harbor/web/harbor.js | 23 ++++++++++++++++++-- internal/harbor/web/index.html | 7 ++++++ internal/proto/proto.go | 7 ++++++ internal/proto/window.go | 31 ++++++++++++++++++++++++++ internal/proto/window_test.go | 36 +++++++++++++++++++++++++++++++ internal/server/e2e_test.go | 33 ++++++++++++++++++++++++++++ internal/server/schedules.go | 35 ++++++++++++++++++++++++++++++ internal/server/schedules_test.go | 35 ++++++++++++++++++++++++++++++ internal/server/server.go | 3 +++ 18 files changed, 278 insertions(+), 5 deletions(-) create mode 100644 internal/server/schedules.go create mode 100644 internal/server/schedules_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 9149ca2..e3c769b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,10 @@ has a matching GitHub release whose body comes from its section below. without anyone typing `needs_mib` or keeping it up to date. An engine not yet measured takes the whole card, and the grant line in `berth events` names the size it used ([#311](https://github.com/T-Crypt/berth/issues/311)). +- `berth status` has a SCHEDULE table and the harbor a SCHEDULES panel. Each lists every engine that has a + `window`, with its hours, whether they are open, and how long until they close or open. An engine shows before its + window opens, and a `berth run --window` lease shows its own hours. The status JSON carries the same rows as + `schedules`, and each lease carries its `window`. ### Fixed diff --git a/docs/leasing.md b/docs/leasing.md index f38c229..e643d3f 100644 --- a/docs/leasing.md +++ b/docs/leasing.md @@ -187,8 +187,9 @@ maintenance or before a VM takes it. Name the card by its name or its PCI addres [Run an engine whenever the card is free](gateway.md#run-an-engine-whenever-the-card-is-free). - **A window puts either on the clock.** `window = "23:00-07:00"` on the entry, or `berth run --window 23:00-07:00`, holds the lease to those hours on the node's wall clock. It may cross midnight. A lease that asks outside them - waits for them with no deadline (unless `--wait` sets one) and holds up nobody behind it. `berth status` says when - the window opens, and a background engine is not started at all. When the window closes its holder drains at its usual boundary, so a slot or a job boundary comes first and a + waits for them with no deadline (unless `--wait` sets one) and holds up nobody behind it. A background engine is + not started at all outside its hours. `berth status` (SCHEDULE) and the harbor (SCHEDULES) list every engine that + has a window, whether or not it runs, with its hours and when it next opens or closes. When the window closes its holder drains at its usual boundary, so a slot or a job boundary comes first and a request in flight finishes. ```toml diff --git a/internal/broker/status.go b/internal/broker/status.go index bf93210..d297579 100644 --- a/internal/broker/status.go +++ b/internal/broker/status.go @@ -86,6 +86,7 @@ func (b *Broker) Status() proto.Status { GPUPIDs: pids, Used: l.used(), GTTUsed: l.gttUsed(), GTTContested: l.contestedGTT, Contested: l.contested, Age: now.Sub(since).Seconds(), Pinned: l.pinned, + Window: l.window.String(), } if l.state == parked { pl.ParkedSince = parkedAge(l, now) diff --git a/internal/broker/window_test.go b/internal/broker/window_test.go index 2374637..74b04a4 100644 --- a/internal/broker/window_test.go +++ b/internal/broker/window_test.go @@ -197,3 +197,19 @@ func TestWindowWaiterOnSeveralCardsOutlastsTheDefaultWait(t *testing.T) { t.Fatal("nightly is not on both cards") } } + +// The status names the hours a lease is held to, waiting or granted, and +// leaves a lease with no window without one. +func TestStatusCarriesTheLeaseWindow(t *testing.T) { + b, clk := startTurnBroker(t, procs.Map{}) + clk.set(at2330) + must(t, acquire(b, Request{Engine: "nightly", Priority: Batch, Needs: 8 * GiB, Window: night})) + must(t, acquire(b, Request{Engine: "chat", Priority: Interactive, Needs: 4 * GiB})) + got := map[string]string{} + for _, l := range b.Status().Leases { + got[l.Engine] = l.Window + } + if got["nightly"] != "23:00-07:00" || got["chat"] != "" { + t.Errorf("lease windows = %v, want nightly 23:00-07:00 and chat none", got) + } +} diff --git a/internal/cli/daemon.go b/internal/cli/daemon.go index 16188dc..131f8d9 100644 --- a/internal/cli/daemon.go +++ b/internal/cli/daemon.go @@ -279,7 +279,11 @@ func runDaemon(c *Context) int { go samplerLoop(ctx, rec, hr, n, watcher, ev, &lastHost, &lastAlerts) x := server.Extras{Engines: watcher.Snapshot, Host: lastHost.Load, History: rec.Get, Insights: func() *proto.Insights { return watcher.Insights(time.Now()) }, - Requests: watcher.Requests, Alerts: lastAlerts.Load, Finished: watcher.Finished} + Requests: watcher.Requests, Alerts: lastAlerts.Load, Finished: watcher.Finished, + Windows: map[string]proto.Window{}} + for _, e := range cfg.Engine { + x.Windows[e.Name] = e.Window + } if *devicesFile != "" { x.Pair = &pair.Store{Path: *devicesFile} } diff --git a/internal/cli/status.go b/internal/cli/status.go index 68cebaf..bd1e51f 100644 --- a/internal/cli/status.go +++ b/internal/cli/status.go @@ -134,6 +134,16 @@ func (v statusView) Human(c *Context, ok bool) error { } lease("LEASE", st.Leases, false) lease("WAITING", st.Waiting, true) + if len(st.Schedules) > 0 { + fmt.Fprint(tw, "\nSCHEDULE\tHOURS\tNOW\n") + for _, s := range st.Schedules { + now := c.Style.Warn("closed") + ", opens in " + age(s.ChangeS) + if s.Open { + now = c.Style.OK("open") + ", closes in " + age(s.ChangeS) + } + fmt.Fprintf(tw, "%s\t%s\t%s\n", s.Engine, s.Window, esc(now)) + } + } if len(st.Squatters) > 0 { fmt.Fprint(tw, "\n"+cardCol("SQUATTER", "CARD")+"\tPID\tHOLDS\tSEEN\tUNPROTECTED RUN\n") for _, s := range st.Squatters { diff --git a/internal/cli/status_test.go b/internal/cli/status_test.go index 1dcf5fd..0965163 100644 --- a/internal/cli/status_test.go +++ b/internal/cli/status_test.go @@ -442,3 +442,26 @@ func TestClaimsTablesSayHoldsAndNameCards(t *testing.T) { t.Errorf("one card claims table:\n%s", s) } } + +// berth status lists every engine held to hours and where the node's clock +// sits in them, so a window shows before its engine runs. +func TestStatusShowsTheSchedules(t *testing.T) { + var out, errOut bytes.Buffer + c := &Context{Out: &out, Err: &errOut, Format: FormatHuman, Style: newStyle(&out), errStyle: newStyle(&errOut)} + st := &proto.Status{ + API: proto.APIVersion, Version: "test", + Schedules: []proto.Schedule{ + {Engine: "nightly", Window: "23:00-07:00", Open: false, ChangeS: 3 * 3600}, + {Engine: "render", Window: "18:00-22:00", Open: true, ChangeS: 2*3600 + 15*60}, + }, + } + if err := (statusView{st: st}).Human(c, true); err != nil { + t.Fatal(err) + } + s := out.String() + for _, want := range []string{"SCHEDULE", "HOURS", "nightly", "23:00-07:00", "closed, opens in 3h", "render", "open, closes in 2h15m"} { + if !strings.Contains(s, want) { + t.Errorf("stdout lacks %q:\n%s", want, s) + } + } +} diff --git a/internal/harbor/web/demo.json b/internal/harbor/web/demo.json index 0e6951e..af73c4d 100644 --- a/internal/harbor/web/demo.json +++ b/internal/harbor/web/demo.json @@ -127,6 +127,10 @@ "age_seconds": 40 } ], + "schedules": [ + {"engine": "nightly-train", "window": "23:00-07:00", "open": false, "change_s": 10800}, + {"engine": "render", "window": "18:00-22:00", "open": true, "change_s": 8100} + ], "waiting": [ { "id": "LIT-0145", diff --git a/internal/harbor/web/harbor.css b/internal/harbor/web/harbor.css index 1a91cf0..58f4e13 100644 --- a/internal/harbor/web/harbor.css +++ b/internal/harbor/web/harbor.css @@ -1036,6 +1036,10 @@ body.ready #panel-engines > :nth-child(n+2) { animation-delay: 60ms; } .sq.sw-up { border-left-color: var(--green); } .sq.sw-waiting, .sq.sw-starting { border-left-color: var(--amber); } .sq.sw-failed { border-left-color: var(--magenta); } +/* A schedule row: green while its hours are open, dim while shut. */ +.sq.sched { border-left-color: var(--dim-2); } +.sq.sched .name { color: var(--ink-strong); } +.sq.sched-open { border-left-color: var(--green); } .sw-state { display: inline-flex; align-items: center; gap: var(--s1); white-space: nowrap; } .sw-chip { border: 1px solid var(--hair-2); border-radius: var(--r-pill); padding: 0 var(--s2); font-size: var(--fs-micro); color: var(--dim); } .sw-cordon, .sw-pinned { color: var(--amber); border-color: var(--amber-dim); } diff --git a/internal/harbor/web/harbor.js b/internal/harbor/web/harbor.js index b6aa942..4dc3110 100644 --- a/internal/harbor/web/harbor.js +++ b/internal/harbor/web/harbor.js @@ -133,7 +133,7 @@ let shortcutsDlg, railMenuDlg; let lastLogSig = null; // filter+query+pause signature: repaint only on change, append otherwise let clearLogFilter = null; // set by buildLogSearch: the page's Esc reaches it (R-07) let lastTick = 0; // the relative-time ticker's own 1 s cadence -let berthsRoot, claimsRoot, claimsMeta, stowRoot, notickRoot, machineRoot, machineCharts, machineMeta, socketLine; +let berthsRoot, schedulesRoot, schedulesMeta, claimsRoot, claimsMeta, stowRoot, notickRoot, machineRoot, machineCharts, machineMeta, socketLine; let kpiStripEl, tideEl, tideLegend, tideMeta; let boardMeta, berthsMeta, stowMeta, noticketMeta, enginesMeta; let throughputMeta, throughputDecode, throughputRpm; @@ -168,6 +168,8 @@ function main() { shortcutsDlg = $("shortcuts"); railMenuDlg = $("rail-menu"); berthsRoot = $("berths"); + schedulesRoot = $("schedules"); + schedulesMeta = $("schedules-meta"); claimsRoot = $("claims"); claimsMeta = $("claims-meta"); stowRoot = $("stowaways"); @@ -508,7 +510,7 @@ let pendingSection = null; const HARBOR_SECTIONS = [ ["sec-counter", "Counter"], ["sec-tide", "Tide"], ["sec-timeline", "Timeline"], ["sec-board", "Board"], ["sec-log", "Log"], ["sec-berths", "Berths"], - ["sec-machine", "Machine"], ["sec-claims", "Claims"], ["sec-stow", "Stowaways"], ["sec-noticket", "No ticket"], + ["sec-machine", "Machine"], ["sec-schedules", "Schedules"], ["sec-claims", "Claims"], ["sec-stow", "Stowaways"], ["sec-noticket", "No ticket"], ]; const ENGINES_SECTIONS = [ ["sec-engines", "Engines"], ["sec-library", "Library"], ["priority-panel", "Ranking"], ["sec-pool", "KV pool"], @@ -2097,6 +2099,22 @@ function claimLine(cl) { function memoryWord(cl) { return fmtGiB(cl.used || 0) + " GiB" + (cl.gtt_used ? " + " + fmtGiB(cl.gtt_used) + " GiB GTT" : ""); } +// renderSchedules lists the engines held to hours, by the node's clock, as +// berth status does: an engine shows here before its window opens. +function renderSchedules(s) { + const list = el("div", "squatter-list"); + const all = s.schedules || []; + const open = all.filter((sc) => sc.open); + schedulesMeta.textContent = all.length ? open.length + " open of " + all.length : "none"; + if (all.length === 0) list.append(el("div", "empty-note", "no engine is held to hours: set window = \"23:00-07:00\" on an [[engine]]")); + for (const sc of all) { + const row = el("div", "sq sched" + (sc.open ? " sched-open" : "")); + const now = sc.open ? "open, closes in " + fmtAge(sc.change_s) : "closed, opens in " + fmtAge(sc.change_s); + row.append(el("div", "top", el("span", "name", sc.engine), el("span", null, sc.window)), el("div", "meta", now)); + list.append(row); + } + schedulesRoot.replaceChildren(list); +} function renderClaims(s) { const list = el("div", "squatter-list"); const all = s.claims || []; @@ -2469,6 +2487,7 @@ function renderLight(s) { paintTabCounts(entries.length, (s.engines || []).length); renderBerths(s); paintAlerts(s); + renderSchedules(s); renderClaims(s); renderStowaways(s); renderNoTicket(s); diff --git a/internal/harbor/web/index.html b/internal/harbor/web/index.html index f70a875..8cf1682 100644 --- a/internal/harbor/web/index.html +++ b/internal/harbor/web/index.html @@ -168,6 +168,13 @@

THE MACHINE

+
+
+

SCHEDULES

+ engine hours +
+
+

CLAIMS

diff --git a/internal/proto/proto.go b/internal/proto/proto.go index 93fafda..b31c588 100644 --- a/internal/proto/proto.go +++ b/internal/proto/proto.go @@ -376,6 +376,10 @@ type Status struct { Priority *PriorityStatus `json:"priority,omitempty"` Claims []Claim `json:"claims,omitempty"` Footprints []EngineFootprint `json:"footprints,omitempty"` + // Schedules are the engines held to hours, by engine name: each + // configured window, and a lease's own (berth run --window) in place of + // its engine's, whether or not anything runs now. + Schedules []Schedule `json:"schedules,omitempty"` // ParkedBytes is the RAM the parked engines hold: each one's Berth // scope's anon plus shmem, or its VRAM footprint where Berth reads no // scope. A reading, never a reservation. @@ -591,6 +595,9 @@ type Lease struct { // expects the waiting engine to start, from the measured starts in // its queue chain only; 0 = unknown (no book, or nothing measured). EstimateS float64 `json:"estimate_start_s,omitempty"` + // Window is the hours the broker holds the lease to, "23:00-07:00"; + // "" = none. + Window string `json:"window,omitempty"` } type Squatter struct { diff --git a/internal/proto/window.go b/internal/proto/window.go index 4704224..a00cfaf 100644 --- a/internal/proto/window.go +++ b/internal/proto/window.go @@ -89,6 +89,37 @@ func (w Window) Opens(t time.Time) time.Duration { return time.Duration(left)*time.Minute - time.Duration(t.Second())*time.Second - time.Duration(t.Nanosecond())*time.Nanosecond } +// Closes is how long a lease inside w keeps its hours: 0 outside, and with +// no window, which never closes. +func (w Window) Closes(t time.Time) time.Duration { + if !w.Set() || !w.Contains(t) { + return 0 + } + left := (w.End - minuteOf(t) + minutesPerDay) % minutesPerDay + return time.Duration(left)*time.Minute - time.Duration(t.Second())*time.Second - time.Duration(t.Nanosecond())*time.Nanosecond +} + +// Schedule is one engine's hours as the node's clock reads them now. +type Schedule struct { + Engine string `json:"engine"` + Window string `json:"window"` + Open bool `json:"open"` + // ChangeS is the seconds until the window closes when Open, else until + // it opens. + ChangeS float64 `json:"change_s"` +} + +// ScheduleAt reads w for engine at t. +func ScheduleAt(engine string, w Window, t time.Time) Schedule { + s := Schedule{Engine: engine, Window: w.String(), Open: w.Contains(t)} + if s.Open { + s.ChangeS = w.Closes(t).Seconds() + } else { + s.ChangeS = w.Opens(t).Seconds() + } + return s +} + func minuteOf(t time.Time) int { return t.Hour()*60 + t.Minute() } // String is the window as a config file writes it, "23:00-07:00". The zero diff --git a/internal/proto/window_test.go b/internal/proto/window_test.go index 22a889c..5affd69 100644 --- a/internal/proto/window_test.go +++ b/internal/proto/window_test.go @@ -83,3 +83,39 @@ func TestWindowContainsAndOpens(t *testing.T) { } } } + +func TestWindowCloses(t *testing.T) { + at := func(h, m int) time.Time { return time.Date(2026, 11, 2, h, m, 0, 0, zone) } + night := Window{Start: 23 * 60, End: 7 * 60} + work := Window{Start: 9*60 + 30, End: 17 * 60} + for _, tc := range []struct { + name string + w Window + at time.Time + closes time.Duration + }{ + {"night at its start", night, at(23, 0), 8 * time.Hour}, + {"night past midnight", night, at(0, 30), 6*time.Hour + 30*time.Minute}, + {"night half a minute before its end", night, at(6, 59).Add(30 * time.Second), 30 * time.Second}, + {"night at its end", night, at(7, 0), 0}, + {"work at noon", work, at(12, 0), 5 * time.Hour}, + {"work the evening after", work, at(18, 0), 0}, + {"no window", Window{}, at(12, 0), 0}, + } { + if got := tc.w.Closes(tc.at); got != tc.closes { + t.Errorf("%s: Closes = %v, want %v", tc.name, got, tc.closes) + } + } +} + +func TestScheduleAt(t *testing.T) { + night := Window{Start: 23 * 60, End: 7 * 60} + open := ScheduleAt("agent", night, time.Date(2026, 11, 2, 1, 0, 0, 0, zone)) + if want := (Schedule{Engine: "agent", Window: "23:00-07:00", Open: true, ChangeS: 6 * 3600}); open != want { + t.Errorf("inside: %+v, want %+v", open, want) + } + shut := ScheduleAt("agent", night, time.Date(2026, 11, 2, 20, 0, 0, 0, zone)) + if want := (Schedule{Engine: "agent", Window: "23:00-07:00", Open: false, ChangeS: 3 * 3600}); shut != want { + t.Errorf("outside: %+v, want %+v", shut, want) + } +} diff --git a/internal/server/e2e_test.go b/internal/server/e2e_test.go index e6e95f0..222c82d 100644 --- a/internal/server/e2e_test.go +++ b/internal/server/e2e_test.go @@ -516,3 +516,36 @@ func TestComfyUIDrainWaitsForJobBoundary(t *testing.T) { t.Fatalf("no handoff line:\n%s", out1.String()) } } + +// The socket's status carries the configured hours of an engine with no +// lease, so a client sees a schedule before its engine runs. +func TestSocketStatusCarriesTheSchedules(t *testing.T) { + sock := filepath.Join(t.TempDir(), "berth.sock") + log := slog.New(slog.NewTextHandler(io.Discard, nil)) + b := broker.New(broker.Config{Poll: 20 * time.Millisecond, DefaultWait: 5 * time.Second, JuggleWindow: -1, Log: log}, emptyCard{}, procs.System{}) + ln, err := server.Listen(sock) + if err != nil { + t.Fatal(err) + } + ctx, cancel := context.WithCancel(context.Background()) + t.Cleanup(cancel) + go b.Run(ctx) + windows := map[string]proto.Window{"nightly": {Start: 23 * 60, End: 7 * 60}, "chat": {}} + go server.Serve(ctx, ln, node.One(b), server.Extras{Windows: windows}, log) + + conn, raw, err := server.Dial(sock) + if err != nil { + t.Fatal(err) + } + defer raw.Close() + if err := conn.Send(proto.Msg{Op: proto.OpStatus}); err != nil { + t.Fatal(err) + } + m, err := conn.Recv() + if err != nil || m.Status == nil { + t.Fatalf("status: %v %+v", err, m) + } + if s := m.Status.Schedules; len(s) != 1 || s[0].Engine != "nightly" || s[0].Window != "23:00-07:00" || s[0].ChangeS <= 0 { + t.Fatalf("schedules = %+v, want nightly 23:00-07:00 alone", s) + } +} diff --git a/internal/server/schedules.go b/internal/server/schedules.go new file mode 100644 index 0000000..561209f --- /dev/null +++ b/internal/server/schedules.go @@ -0,0 +1,35 @@ +// Copyright 2026 Trevin Tindall (T-Crypt) +// SPDX-License-Identifier: Apache-2.0 + +package server + +import ( + "slices" + "strings" + "time" + + "github.com/T-Crypt/berth/internal/proto" +) + +// schedules is every engine held to hours at now, one row per engine by +// name: the configured windows, with a lease's own window in place of its +// engine's, since that is the one the broker enforces. +func schedules(configured map[string]proto.Window, st *proto.Status, now time.Time) []proto.Schedule { + hours := make(map[string]proto.Window, len(configured)) + for name, w := range configured { + if w.Set() { + hours[name] = w + } + } + for _, l := range slices.Concat(st.Leases, st.Waiting) { + if w, err := proto.ParseWindow(l.Window); err == nil && w.Set() { + hours[l.Engine] = w + } + } + out := make([]proto.Schedule, 0, len(hours)) + for name, w := range hours { + out = append(out, proto.ScheduleAt(name, w, now)) + } + slices.SortFunc(out, func(a, b proto.Schedule) int { return strings.Compare(a.Engine, b.Engine) }) + return out +} diff --git a/internal/server/schedules_test.go b/internal/server/schedules_test.go new file mode 100644 index 0000000..801486e --- /dev/null +++ b/internal/server/schedules_test.go @@ -0,0 +1,35 @@ +// Copyright 2026 Trevin Tindall (T-Crypt) +// SPDX-License-Identifier: Apache-2.0 + +package server + +import ( + "slices" + "testing" + "time" + + "github.com/T-Crypt/berth/internal/proto" +) + +// An engine with hours shows whether or not it runs, and a lease's own +// window stands in for its engine's. +func TestSchedulesJoinConfigAndLeases(t *testing.T) { + now := time.Date(2026, 11, 12, 20, 0, 0, 0, time.Local) + configured := map[string]proto.Window{ + "nightly": {Start: 23 * 60, End: 7 * 60}, + "chat": {}, + "render": {Start: 9 * 60, End: 17 * 60}, + } + st := &proto.Status{ + Leases: []proto.Lease{{Engine: "render", Window: "18:00-22:00"}, {Engine: "chat"}}, + Waiting: []proto.Lease{{Engine: "job", Window: "01:00-05:00"}}, + } + want := []proto.Schedule{ + {Engine: "job", Window: "01:00-05:00", Open: false, ChangeS: 5 * 3600}, + {Engine: "nightly", Window: "23:00-07:00", Open: false, ChangeS: 3 * 3600}, + {Engine: "render", Window: "18:00-22:00", Open: true, ChangeS: 2 * 3600}, + } + if got := schedules(configured, st, now); !slices.Equal(got, want) { + t.Errorf("schedules =\n%+v\nwant\n%+v", got, want) + } +} diff --git a/internal/server/server.go b/internal/server/server.go index ac1c04b..eaaacf8 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -118,6 +118,8 @@ type Extras struct { // Finished hears that a run's engine ended on purpose (exit 0, or a // stop the run carried out), by the lease's engine name. Finished func(engine string) + // Windows are the configured engines' hours, by engine name. + Windows map[string]proto.Window } // Serve answers clients on ln. @@ -168,6 +170,7 @@ func handle(ctx context.Context, c net.Conn, n *node.Node, x Extras, log *slog.L st := n.Status() st.Engines, st.Host, st.Insights = x.Engines(), x.Host(), x.Insights() st.Alerts = x.Alerts() + st.Schedules = schedules(x.Windows, &st, time.Now()) st.Counters.SendTimeouts = sendTimeouts.Load() st.Counters.DroppedConsumers = droppedConsumers.Load() reply(conn, log, proto.Msg{Op: proto.OpStatus, Status: &st})