Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(scripts): server metrics attach real clients and time a reconnect storm #41281

Mergedjuliusmarmingemerged 8 commits intoperf/server-metrics-busy fromrefs/pull/41281/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 66 additions and 0 deletions (loading 1).

x
0 of 3 viewed, 3 left
44 additions and 0 deletionsscripts/server-metrics-report.tsModified
View file
@@ -48,6 +48,20 @@
scaling: Schema.optional(Scaling),
streaming: Schema.optional(Window),
soak: Schema.optional(Soak),
+ /** One web-like client attached over the WebSocket RPC, with N threads subscribed. */
+ clients: Schema.optional(
+ Schema.Struct({
+ /** The quiet window by subscribed thread count. */
+ attached: Schema.Record(Schema.String, Window),
+ /** Every client drops and reconnects at once. */
+ storm: Schema.Struct({
+ clients: Schema.Number,
+ resubscribedMs: Schema.Number,
+ loopDelayP99Ms: Schema.Number,
+ loopDelayMaxMs: Schema.Number,
+ }),
+ }),
+ ),
/** A server on a copy of the developer's real database, its projects backed by clones. */
busy: Schema.optional(
Schema.Struct({
@@ -232,6 +246,7 @@
metric.endsWith("loopSamples") ||
metric === "busy.projects" ||
metric === "busy.ballastMB" ||
+ metric === "clients.storm.clients" ||
metric.startsWith("scaling.points")
) {
continue;