toilscript 0.1.51 → 0.1.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/web.js CHANGED
@@ -1,8 +1,8 @@
1
- var ASSEMBLYSCRIPT_VERSION = "0.1.51";
1
+ var ASSEMBLYSCRIPT_VERSION = "0.1.53";
2
2
  var ASSEMBLYSCRIPT_IMPORTMAP = {
3
3
  "imports": {
4
- "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.51/dist/toilscript.js",
5
- "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.51/dist/cli.js",
4
+ "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.53/dist/toilscript.js",
5
+ "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.53/dist/cli.js",
6
6
  "binaryen": "https://cdn.jsdelivr.net/npm/binaryen@130.0.0-nightly.20260609/index.js",
7
7
  "long": "https://cdn.jsdelivr.net/npm/long@5.3.2/index.js"
8
8
  }
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "toilscript",
9
9
  "wasm"
10
10
  ],
11
- "version": "0.1.51",
11
+ "version": "0.1.53",
12
12
  "author": "Daniel Wirtz <dcode+assemblyscript@dcode.io>",
13
13
  "license": "Apache-2.0",
14
14
  "homepage": "https://github.com/dacely-cloud/toilscript",
@@ -223,6 +223,10 @@ export namespace toildbHost {
223
223
  @external("env", "data.latest")
224
224
  export declare function latest(handle: u32, keyPtr: usize, keyLen: i32, limit: i32): i32;
225
225
 
226
+ // @ts-ignore: decorator
227
+ @external("env", "data.events_since")
228
+ export declare function eventsSince(handle: u32, keyPtr: usize, keyLen: i32, limit: i32): i32;
229
+
226
230
  // events.append_once -> 1 appended | 0 duplicate (deduped on eventId) | <0 error.
227
231
  // Idempotent append: a retried call with the same eventId never doubles the event.
228
232
  // @ts-ignore: decorator
@@ -440,7 +440,7 @@ export class Counter<K> {
440
440
 
441
441
  /// Every per-domain metric, by stable numeric id. This is the WIRE CONTRACT shared with the edge
442
442
  /// (`src/analytics/metric_id.rs`) and the dev server; it orders the snapshot frame and addresses a
443
- /// time-series. Ids `0..=40` are cumulative COUNTERS (a rate is `value / seconds`); `41..=44` are the
443
+ /// time-series. Ids `0..=42` are cumulative COUNTERS (a rate is `value / seconds`); `43..=46` are the
444
444
  /// avg/peak series of the two GAUGES. Append-only: never renumber.
445
445
  export enum MetricId {
446
446
  Requests = 0,
@@ -451,48 +451,49 @@ export enum MetricId {
451
451
  Status4xx = 5,
452
452
  Status5xx = 6,
453
453
  StaticHits = 7,
454
- WasmDispatches = 8,
455
- ExecutorFullRejects = 9,
456
- UnknownHostRejects = 10,
457
- RateLimitedRejects = 11,
458
- GasUsed = 12,
459
- DbOps = 13,
460
- DbReads = 14,
461
- DbWrites = 15,
462
- DbErrors = 16,
463
- DbLatencyNsSum = 17,
464
- StreamAccepts = 18,
465
- StreamRejectWrongNode = 19,
466
- StreamRejectCapacity = 20,
467
- StreamRejectArtifact = 21,
468
- StreamRejectGuest = 22,
469
- StreamTraps = 23,
470
- StreamIdleTimeouts = 24,
471
- StreamBytesIn = 25,
472
- StreamBytesOut = 26,
473
- StreamBackpressureEvents = 27,
474
- StreamCloses = 28,
475
- StreamDisconnects = 29,
476
- DaemonStarts = 30,
477
- DaemonStartFailures = 31,
478
- DaemonTicksFired = 32,
479
- DaemonTicksSkippedNotLeader = 33,
480
- DaemonTicksFailed = 34,
481
- DaemonLeaderAcquires = 35,
482
- DaemonLeaderFenced = 36,
483
- DaemonHttpCallAttempts = 37,
484
- DaemonHttpCallFailures = 38,
485
- MemGrownBytes = 39,
486
- Emails = 40,
487
- ConnectedStreamsAvg = 41,
488
- ConnectedStreamsPeak = 42,
489
- CommittedMemoryAvg = 43,
490
- CommittedMemoryPeak = 44,
454
+ ExecutorFullRejects = 8,
455
+ UnknownHostRejects = 9,
456
+ RateLimitedRejects = 10,
457
+ GasUsed = 11,
458
+ DbOps = 12,
459
+ DbReads = 13,
460
+ DbWrites = 14,
461
+ DbErrors = 15,
462
+ DbLatencyNsSum = 16,
463
+ StreamAccepts = 17,
464
+ StreamRejectWrongNode = 18,
465
+ StreamRejectCapacity = 19,
466
+ StreamRejectArtifact = 20,
467
+ StreamRejectGuest = 21,
468
+ StreamTraps = 22,
469
+ StreamIdleTimeouts = 23,
470
+ StreamBytesIn = 24,
471
+ StreamBytesOut = 25,
472
+ StreamBackpressureEvents = 26,
473
+ StreamCloses = 27,
474
+ StreamDisconnects = 28,
475
+ DaemonStarts = 29,
476
+ DaemonStartFailures = 30,
477
+ DaemonTicksFired = 31,
478
+ DaemonTicksSkippedNotLeader = 32,
479
+ DaemonTicksFailed = 33,
480
+ DaemonLeaderAcquires = 34,
481
+ DaemonLeaderFenced = 35,
482
+ DaemonHttpCallAttempts = 36,
483
+ DaemonHttpCallFailures = 37,
484
+ MemGrownBytes = 38,
485
+ Emails = 39,
486
+ CacheHits = 40,
487
+ CacheMisses = 41,
488
+ ConnectedStreamsAvg = 42,
489
+ ConnectedStreamsPeak = 43,
490
+ CommittedMemoryAvg = 44,
491
+ CommittedMemoryPeak = 45,
491
492
  }
492
493
 
493
- /// The number of cumulative counter metrics (`MetricId 0..=40`) = the length of the snapshot's lifetime
494
+ /// The number of cumulative counter metrics (`MetricId 0..=41`) = the length of the snapshot's lifetime
494
495
  /// section.
495
- export const METRIC_COUNTERS: i32 = 41;
496
+ export const METRIC_COUNTERS: i32 = 42;
496
497
 
497
498
  /// A dashboard time range for `Analytics.series`. Short ranges (1h/6h) read the per-MINUTE ring; the rest
498
499
  /// read the per-HOUR ring (30-day retention).
@@ -512,56 +513,80 @@ export enum AnalyticsRange {
512
513
  /// value either by the typed getter (`stats.requests`) or by id (`stats.metric(MetricId.Requests)`).
513
514
  export class TenantStats {
514
515
  /// Lifetime totals indexed by `MetricId` (length `METRIC_COUNTERS`). Prefer the named getters below.
515
- life: StaticArray<i64> = new StaticArray<i64>(METRIC_COUNTERS);
516
+ life: StaticArray<u64> = new StaticArray<u64>(METRIC_COUNTERS);
516
517
  /// Live gauges (current level, not a total).
517
- connectedStreams: i64 = 0;
518
- committedMemory: i64 = 0;
518
+ connectedStreams: u64 = 0;
519
+ committedMemory: u64 = 0;
519
520
  /// Request windows: current bucket usage + plan cap (0 = unlimited).
520
- reqMinuteUsed: i64 = 0;
521
+ reqMinuteUsed: u64 = 0;
521
522
  reqMinuteCap: u64 = 0;
522
- reqDayUsed: i64 = 0;
523
+ reqDayUsed: u64 = 0;
523
524
  reqDayCap: u64 = 0;
524
525
  /// Edge wall-clock (ms) when the snapshot was read.
525
526
  nowMs: u64 = 0;
526
527
 
527
528
  /// Any counter metric by id (0 for an out-of-range id).
528
- metric(id: MetricId): i64 {
529
+ metric(id: MetricId): u64 {
529
530
  return <i32>id < METRIC_COUNTERS ? this.life[<i32>id] : 0;
530
531
  }
531
532
 
532
533
  // Typed getters for every counter (the catalog: no magic strings, self-documenting).
533
- get requests(): i64 { return this.life[MetricId.Requests]; }
534
- get bytesOutL1(): i64 { return this.life[MetricId.BytesOutL1]; }
535
- get bytesInL1(): i64 { return this.life[MetricId.BytesInL1]; }
536
- get status2xx(): i64 { return this.life[MetricId.Status2xx]; }
537
- get status3xx(): i64 { return this.life[MetricId.Status3xx]; }
538
- get status4xx(): i64 { return this.life[MetricId.Status4xx]; }
539
- get status5xx(): i64 { return this.life[MetricId.Status5xx]; }
540
- get staticHits(): i64 { return this.life[MetricId.StaticHits]; }
541
- get wasmDispatches(): i64 { return this.life[MetricId.WasmDispatches]; }
542
- get executorFullRejects(): i64 { return this.life[MetricId.ExecutorFullRejects]; }
543
- get unknownHostRejects(): i64 { return this.life[MetricId.UnknownHostRejects]; }
544
- get rateLimitedRejects(): i64 { return this.life[MetricId.RateLimitedRejects]; }
545
- get gasUsed(): i64 { return this.life[MetricId.GasUsed]; }
546
- get dbOps(): i64 { return this.life[MetricId.DbOps]; }
547
- get dbReads(): i64 { return this.life[MetricId.DbReads]; }
548
- get dbWrites(): i64 { return this.life[MetricId.DbWrites]; }
549
- get dbErrors(): i64 { return this.life[MetricId.DbErrors]; }
550
- get dbLatencyNsSum(): i64 { return this.life[MetricId.DbLatencyNsSum]; }
551
- get streamAccepts(): i64 { return this.life[MetricId.StreamAccepts]; }
552
- get streamBytesIn(): i64 { return this.life[MetricId.StreamBytesIn]; }
553
- get streamBytesOut(): i64 { return this.life[MetricId.StreamBytesOut]; }
554
- get streamCloses(): i64 { return this.life[MetricId.StreamCloses]; }
555
- get streamDisconnects(): i64 { return this.life[MetricId.StreamDisconnects]; }
556
- get daemonTicks(): i64 { return this.life[MetricId.DaemonTicksFired]; }
557
- get memGrownBytes(): i64 { return this.life[MetricId.MemGrownBytes]; }
558
- get emails(): i64 { return this.life[MetricId.Emails]; }
534
+ get requests(): u64 { return this.life[MetricId.Requests]; }
535
+ get bytesOutL1(): u64 { return this.life[MetricId.BytesOutL1]; }
536
+ get bytesInL1(): u64 { return this.life[MetricId.BytesInL1]; }
537
+ get status2xx(): u64 { return this.life[MetricId.Status2xx]; }
538
+ get status3xx(): u64 { return this.life[MetricId.Status3xx]; }
539
+ get status4xx(): u64 { return this.life[MetricId.Status4xx]; }
540
+ get status5xx(): u64 { return this.life[MetricId.Status5xx]; }
541
+ get staticHits(): u64 { return this.life[MetricId.StaticHits]; }
542
+ get executorFullRejects(): u64 { return this.life[MetricId.ExecutorFullRejects]; }
543
+ get unknownHostRejects(): u64 { return this.life[MetricId.UnknownHostRejects]; }
544
+ get rateLimitedRejects(): u64 { return this.life[MetricId.RateLimitedRejects]; }
545
+ get gasUsed(): u64 { return this.life[MetricId.GasUsed]; }
546
+ get dbOps(): u64 { return this.life[MetricId.DbOps]; }
547
+ get dbReads(): u64 { return this.life[MetricId.DbReads]; }
548
+ get dbWrites(): u64 { return this.life[MetricId.DbWrites]; }
549
+ get dbErrors(): u64 { return this.life[MetricId.DbErrors]; }
550
+ get dbLatencyNsSum(): u64 { return this.life[MetricId.DbLatencyNsSum]; }
551
+ get streamAccepts(): u64 { return this.life[MetricId.StreamAccepts]; }
552
+ get streamRejectWrongNode(): u64 { return this.life[MetricId.StreamRejectWrongNode]; }
553
+ get streamRejectCapacity(): u64 { return this.life[MetricId.StreamRejectCapacity]; }
554
+ get streamRejectArtifact(): u64 { return this.life[MetricId.StreamRejectArtifact]; }
555
+ get streamRejectGuest(): u64 { return this.life[MetricId.StreamRejectGuest]; }
556
+ get streamTraps(): u64 { return this.life[MetricId.StreamTraps]; }
557
+ get streamIdleTimeouts(): u64 { return this.life[MetricId.StreamIdleTimeouts]; }
558
+ get streamBytesIn(): u64 { return this.life[MetricId.StreamBytesIn]; }
559
+ get streamBytesOut(): u64 { return this.life[MetricId.StreamBytesOut]; }
560
+ get streamBackpressureEvents(): u64 { return this.life[MetricId.StreamBackpressureEvents]; }
561
+ get streamCloses(): u64 { return this.life[MetricId.StreamCloses]; }
562
+ get streamDisconnects(): u64 { return this.life[MetricId.StreamDisconnects]; }
563
+ get daemonStarts(): u64 { return this.life[MetricId.DaemonStarts]; }
564
+ get daemonStartFailures(): u64 { return this.life[MetricId.DaemonStartFailures]; }
565
+ get daemonTicksFired(): u64 { return this.life[MetricId.DaemonTicksFired]; }
566
+ get daemonTicksSkippedNotLeader(): u64 { return this.life[MetricId.DaemonTicksSkippedNotLeader]; }
567
+ get daemonTicksFailed(): u64 { return this.life[MetricId.DaemonTicksFailed]; }
568
+ get daemonLeaderAcquires(): u64 { return this.life[MetricId.DaemonLeaderAcquires]; }
569
+ get daemonLeaderFenced(): u64 { return this.life[MetricId.DaemonLeaderFenced]; }
570
+ get daemonHttpCallAttempts(): u64 { return this.life[MetricId.DaemonHttpCallAttempts]; }
571
+ get daemonHttpCallFailures(): u64 { return this.life[MetricId.DaemonHttpCallFailures]; }
572
+ get memGrownBytes(): u64 { return this.life[MetricId.MemGrownBytes]; }
573
+ get emails(): u64 { return this.life[MetricId.Emails]; }
574
+ get cacheHits(): u64 { return this.life[MetricId.CacheHits]; }
575
+ get cacheMisses(): u64 { return this.life[MetricId.CacheMisses]; }
559
576
 
560
577
  /// Mean host-observed DB op latency (ns), or 0 with no ops.
561
- get meanDbLatencyNs(): i64 {
578
+ get meanDbLatencyNs(): u64 {
562
579
  const ops = this.dbOps;
563
580
  return ops > 0 ? this.dbLatencyNsSum / ops : 0;
564
581
  }
582
+
583
+ /// Fraction of cacheable responses served from cache (`hits / (hits + misses)`),
584
+ /// 0.0 when there were no cacheable responses.
585
+ get cacheRatio(): f64 {
586
+ const hits = this.cacheHits;
587
+ const total = hits + this.cacheMisses;
588
+ return total > 0 ? <f64>hits / <f64>total : 0.0;
589
+ }
565
590
  }
566
591
 
567
592
  /// One metric's time series for a range: `points` oldest→newest, `bucketSecs` the per-bucket width, and
@@ -599,14 +624,15 @@ export class Analytics {
599
624
  stats.nowMs = r.readU64();
600
625
  const count = <i32>r.readU32();
601
626
  for (let i: i32 = 0; i < count && r.ok; i++) {
602
- const v = r.readI64();
627
+ // Wire fields are non-negative i64; read the same bytes as u64.
628
+ const v = r.readU64();
603
629
  if (i < METRIC_COUNTERS) stats.life[i] = v; // ignore any extra (forward-compat)
604
630
  }
605
- stats.connectedStreams = r.readI64();
606
- stats.committedMemory = r.readI64();
607
- stats.reqMinuteUsed = r.readI64();
631
+ stats.connectedStreams = r.readU64();
632
+ stats.committedMemory = r.readU64();
633
+ stats.reqMinuteUsed = r.readU64();
608
634
  stats.reqMinuteCap = r.readU64();
609
- stats.reqDayUsed = r.readI64();
635
+ stats.reqDayUsed = r.readU64();
610
636
  stats.reqDayCap = r.readU64();
611
637
  return stats;
612
638
  }
@@ -707,6 +733,34 @@ export class Events<K, V> {
707
733
  return status == 1;
708
734
  }
709
735
 
736
+ /// The NEXT batch of events for `key` past this derive's checkpoint, OLDEST first, up to `limit`. The
737
+ /// host owns the resumable cursor (seeded from the durable checkpoint and advanced/committed around the
738
+ /// fold), so repeated calls drain an unbounded log in bounded batches and return an empty array once
739
+ /// caught up. Use it in a `@derive` (or `@job`) to fold a growing log incrementally instead of rescanning:
740
+ /// `for (const e of this.events.since(key, 500)) { ...update the view... }`, looping until it is empty.
741
+ /// The fold must be idempotent per event (a heal can trigger a full re-read). Same frame as `latest`.
742
+ since(key: K, limit: i32): V[] {
743
+ const kb = key.encode();
744
+ const status = toildbHost.eventsSince(this.__handle, kb.dataStart, kb.byteLength, limit);
745
+ if (status < 0) unreachable();
746
+ const blob = __toildbTake(status);
747
+ const out = new Array<V>();
748
+ let off: i32 = 0;
749
+ const count = load<u32>(blob.dataStart + off);
750
+ off += 4;
751
+ for (let i: u32 = 0; i < count; i++) {
752
+ const ver = <i64>load<u32>(blob.dataStart + off);
753
+ off += 4;
754
+ const len = <i32>load<u32>(blob.dataStart + off);
755
+ off += 4;
756
+ const ev = instantiate<V>();
757
+ ev.decodeIntoVersioned(blob.subarray(off, off + len), ver);
758
+ out.push(ev);
759
+ off += len;
760
+ }
761
+ return out;
762
+ }
763
+
710
764
  /// The newest `limit` events, newest first. Decodes each framed event into a
711
765
  /// `V`. The host frames them as `u32 count` then per event
712
766
  /// `u32 schema_version + u32 len + bytes`.
@@ -280,23 +280,25 @@ declare class Counter<K> {
280
280
  declare class Events<K, V> {
281
281
  append(key: K, event: V): void;
282
282
  latest(key: K, limit: i32): V[];
283
+ since(key: K, limit: i32): V[];
283
284
  }
284
285
 
285
- /** Every per-domain metric, by stable numeric id (the wire contract). `0..=40` are cumulative
286
- * COUNTERS (rate = value/seconds); `41..=44` are the avg/peak series of the two GAUGES. */
286
+ /** Every per-domain metric, by stable numeric id (the wire contract). `0..=42` are cumulative
287
+ * COUNTERS (rate = value/seconds); `42..=45` are the avg/peak series of the two GAUGES. */
287
288
  declare const enum MetricId {
288
289
  Requests = 0, BytesOutL1 = 1, BytesInL1 = 2,
289
290
  Status2xx = 3, Status3xx = 4, Status4xx = 5, Status5xx = 6,
290
- StaticHits = 7, WasmDispatches = 8,
291
- ExecutorFullRejects = 9, UnknownHostRejects = 10, RateLimitedRejects = 11, GasUsed = 12,
292
- DbOps = 13, DbReads = 14, DbWrites = 15, DbErrors = 16, DbLatencyNsSum = 17,
293
- StreamAccepts = 18, StreamRejectWrongNode = 19, StreamRejectCapacity = 20, StreamRejectArtifact = 21,
294
- StreamRejectGuest = 22, StreamTraps = 23, StreamIdleTimeouts = 24, StreamBytesIn = 25,
295
- StreamBytesOut = 26, StreamBackpressureEvents = 27, StreamCloses = 28, StreamDisconnects = 29,
296
- DaemonStarts = 30, DaemonStartFailures = 31, DaemonTicksFired = 32, DaemonTicksSkippedNotLeader = 33,
297
- DaemonTicksFailed = 34, DaemonLeaderAcquires = 35, DaemonLeaderFenced = 36,
298
- DaemonHttpCallAttempts = 37, DaemonHttpCallFailures = 38, MemGrownBytes = 39, Emails = 40,
299
- ConnectedStreamsAvg = 41, ConnectedStreamsPeak = 42, CommittedMemoryAvg = 43, CommittedMemoryPeak = 44,
291
+ StaticHits = 7,
292
+ ExecutorFullRejects = 8, UnknownHostRejects = 9, RateLimitedRejects = 10, GasUsed = 11,
293
+ DbOps = 12, DbReads = 13, DbWrites = 14, DbErrors = 15, DbLatencyNsSum = 16,
294
+ StreamAccepts = 17, StreamRejectWrongNode = 18, StreamRejectCapacity = 19, StreamRejectArtifact = 20,
295
+ StreamRejectGuest = 21, StreamTraps = 22, StreamIdleTimeouts = 23, StreamBytesIn = 24,
296
+ StreamBytesOut = 25, StreamBackpressureEvents = 26, StreamCloses = 27, StreamDisconnects = 28,
297
+ DaemonStarts = 29, DaemonStartFailures = 30, DaemonTicksFired = 31, DaemonTicksSkippedNotLeader = 32,
298
+ DaemonTicksFailed = 33, DaemonLeaderAcquires = 34, DaemonLeaderFenced = 35,
299
+ DaemonHttpCallAttempts = 36, DaemonHttpCallFailures = 37, MemGrownBytes = 38, Emails = 39,
300
+ CacheHits = 40, CacheMisses = 41,
301
+ ConnectedStreamsAvg = 42, ConnectedStreamsPeak = 43, CommittedMemoryAvg = 44, CommittedMemoryPeak = 45,
300
302
  }
301
303
 
302
304
  /** A dashboard time range for `Analytics.series`. 1h/6h are per-minute; the rest per-hour (30-day). */
@@ -308,39 +310,57 @@ declare const enum AnalyticsRange {
308
310
  * live gauge levels, and the request windows (current usage + plan cap; cap 0 = unlimited). Read a
309
311
  * value by typed getter (`stats.requests`) or by id (`stats.metric(MetricId.Requests)`). */
310
312
  declare class TenantStats {
311
- metric(id: MetricId): i64;
312
- readonly requests: i64;
313
- readonly bytesOutL1: i64;
314
- readonly bytesInL1: i64;
315
- readonly status2xx: i64;
316
- readonly status3xx: i64;
317
- readonly status4xx: i64;
318
- readonly status5xx: i64;
319
- readonly staticHits: i64;
320
- readonly wasmDispatches: i64;
321
- readonly executorFullRejects: i64;
322
- readonly unknownHostRejects: i64;
323
- readonly rateLimitedRejects: i64;
324
- readonly gasUsed: i64;
325
- readonly dbOps: i64;
326
- readonly dbReads: i64;
327
- readonly dbWrites: i64;
328
- readonly dbErrors: i64;
329
- readonly dbLatencyNsSum: i64;
330
- readonly meanDbLatencyNs: i64;
331
- readonly streamAccepts: i64;
332
- readonly streamBytesIn: i64;
333
- readonly streamBytesOut: i64;
334
- readonly streamCloses: i64;
335
- readonly streamDisconnects: i64;
336
- readonly daemonTicks: i64;
337
- readonly memGrownBytes: i64;
338
- readonly emails: i64;
339
- connectedStreams: i64;
340
- committedMemory: i64;
341
- reqMinuteUsed: i64;
313
+ metric(id: MetricId): u64;
314
+ readonly requests: u64;
315
+ readonly bytesOutL1: u64;
316
+ readonly bytesInL1: u64;
317
+ readonly status2xx: u64;
318
+ readonly status3xx: u64;
319
+ readonly status4xx: u64;
320
+ readonly status5xx: u64;
321
+ readonly staticHits: u64;
322
+ readonly executorFullRejects: u64;
323
+ readonly unknownHostRejects: u64;
324
+ readonly rateLimitedRejects: u64;
325
+ readonly gasUsed: u64;
326
+ readonly dbOps: u64;
327
+ readonly dbReads: u64;
328
+ readonly dbWrites: u64;
329
+ readonly dbErrors: u64;
330
+ readonly dbLatencyNsSum: u64;
331
+ readonly meanDbLatencyNs: u64;
332
+ readonly streamAccepts: u64;
333
+ readonly streamRejectWrongNode: u64;
334
+ readonly streamRejectCapacity: u64;
335
+ readonly streamRejectArtifact: u64;
336
+ readonly streamRejectGuest: u64;
337
+ readonly streamTraps: u64;
338
+ readonly streamIdleTimeouts: u64;
339
+ readonly streamBytesIn: u64;
340
+ readonly streamBytesOut: u64;
341
+ readonly streamBackpressureEvents: u64;
342
+ readonly streamCloses: u64;
343
+ readonly streamDisconnects: u64;
344
+ readonly daemonStarts: u64;
345
+ readonly daemonStartFailures: u64;
346
+ readonly daemonTicksFired: u64;
347
+ readonly daemonTicksSkippedNotLeader: u64;
348
+ readonly daemonTicksFailed: u64;
349
+ readonly daemonLeaderAcquires: u64;
350
+ readonly daemonLeaderFenced: u64;
351
+ readonly daemonHttpCallAttempts: u64;
352
+ readonly daemonHttpCallFailures: u64;
353
+ readonly memGrownBytes: u64;
354
+ readonly emails: u64;
355
+ readonly cacheHits: u64;
356
+ readonly cacheMisses: u64;
357
+ /** Fraction of cacheable responses served from cache (`hits / (hits + misses)`), 0.0 when none. */
358
+ readonly cacheRatio: f64;
359
+ connectedStreams: u64;
360
+ committedMemory: u64;
361
+ reqMinuteUsed: u64;
342
362
  reqMinuteCap: u64;
343
- reqDayUsed: i64;
363
+ reqDayUsed: u64;
344
364
  reqDayCap: u64;
345
365
  nowMs: u64;
346
366
  }