@nimbus-sh/platform 0.7.0 → 0.7.1
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/diag-counters.d.ts +11 -0
- package/dist/diag-counters.d.ts.map +1 -1
- package/dist/diag-counters.js +5 -0
- package/package.json +1 -1
- package/src/diag-counters.ts +15 -0
package/dist/diag-counters.d.ts
CHANGED
|
@@ -113,6 +113,15 @@ export interface DiagCounters {
|
|
|
113
113
|
* Empty when the most recent batch had zero errors. */
|
|
114
114
|
errorsByModule: Record<string, string>;
|
|
115
115
|
};
|
|
116
|
+
/**
|
|
117
|
+
* File contents and stdin the session has handed its processes, cumulative
|
|
118
|
+
* since isolate start: the bytes of each supervisor envelope's answer as it
|
|
119
|
+
* leaves the session (worker session/supervisor-op.ts answerSupervisorOp)
|
|
120
|
+
* from readFile, readFileBytes, fsRead, fsReadRange, fsReadBatch, the read
|
|
121
|
+
* an fsAcquired carries, and cpReadStdin (a pipe's read ahead). A run's
|
|
122
|
+
* delta is what it was handed, which bounds what it can hold.
|
|
123
|
+
*/
|
|
124
|
+
supervisorAnsweredBytes: number;
|
|
116
125
|
/** Pipelined R2 race outcomes. All counts are cumulative since
|
|
117
126
|
* DO-isolate start. Per-tier cache statistics live in cache-stats. */
|
|
118
127
|
r2: {
|
|
@@ -130,6 +139,8 @@ export interface DiagCounters {
|
|
|
130
139
|
}
|
|
131
140
|
/** Read a snapshot — caller-side mutations don't affect the singleton. */
|
|
132
141
|
export declare function readDiagCounters(): DiagCounters;
|
|
142
|
+
/** Count `bytes` the session answered a process's supervisor call with. */
|
|
143
|
+
export declare function recordSupervisorAnswer(bytes: number): void;
|
|
133
144
|
/** Set the install phase. */
|
|
134
145
|
export declare function setInstallPhase(p: InstallPhase): void;
|
|
135
146
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diag-counters.d.ts","sourceRoot":"","sources":["../src/diag-counters.ts"],"names":[],"mappings":"AAA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;CACtC,GAAG,IAAI,CAKP"}
|
package/dist/diag-counters.js
CHANGED
|
@@ -23,6 +23,7 @@ const _counters = {
|
|
|
23
23
|
inFlightRpcPayloadBytes: 0,
|
|
24
24
|
prefetchBundleBytes: 0,
|
|
25
25
|
prefetchCacheBytes: 0,
|
|
26
|
+
supervisorAnsweredBytes: 0,
|
|
26
27
|
installFacet: {
|
|
27
28
|
tarballsCompleted: 0,
|
|
28
29
|
cumulativeBytesDecoded: 0,
|
|
@@ -47,6 +48,10 @@ const _counters = {
|
|
|
47
48
|
export function readDiagCounters() {
|
|
48
49
|
return { ..._counters };
|
|
49
50
|
}
|
|
51
|
+
/** Count `bytes` the session answered a process's supervisor call with. */
|
|
52
|
+
export function recordSupervisorAnswer(bytes) {
|
|
53
|
+
_counters.supervisorAnsweredBytes += bytes;
|
|
54
|
+
}
|
|
50
55
|
/** Set the install phase. */
|
|
51
56
|
export function setInstallPhase(p) {
|
|
52
57
|
_counters.installPhase = p;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimbus-sh/platform",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "The measured Cloudflare platform truths Nimbus is built on \u2014 error taxonomy, limits tables, budget coordination, and wire-format primitives, with zero runtime dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
package/src/diag-counters.ts
CHANGED
|
@@ -120,6 +120,15 @@ export interface DiagCounters {
|
|
|
120
120
|
* Empty when the most recent batch had zero errors. */
|
|
121
121
|
errorsByModule: Record<string, string>;
|
|
122
122
|
};
|
|
123
|
+
/**
|
|
124
|
+
* File contents and stdin the session has handed its processes, cumulative
|
|
125
|
+
* since isolate start: the bytes of each supervisor envelope's answer as it
|
|
126
|
+
* leaves the session (worker session/supervisor-op.ts answerSupervisorOp)
|
|
127
|
+
* from readFile, readFileBytes, fsRead, fsReadRange, fsReadBatch, the read
|
|
128
|
+
* an fsAcquired carries, and cpReadStdin (a pipe's read ahead). A run's
|
|
129
|
+
* delta is what it was handed, which bounds what it can hold.
|
|
130
|
+
*/
|
|
131
|
+
supervisorAnsweredBytes: number;
|
|
123
132
|
/** Pipelined R2 race outcomes. All counts are cumulative since
|
|
124
133
|
* DO-isolate start. Per-tier cache statistics live in cache-stats. */
|
|
125
134
|
r2: {
|
|
@@ -141,6 +150,7 @@ const _counters: DiagCounters = {
|
|
|
141
150
|
inFlightRpcPayloadBytes: 0,
|
|
142
151
|
prefetchBundleBytes: 0,
|
|
143
152
|
prefetchCacheBytes: 0,
|
|
153
|
+
supervisorAnsweredBytes: 0,
|
|
144
154
|
installFacet: {
|
|
145
155
|
tarballsCompleted: 0,
|
|
146
156
|
cumulativeBytesDecoded: 0,
|
|
@@ -167,6 +177,11 @@ export function readDiagCounters(): DiagCounters {
|
|
|
167
177
|
return { ..._counters };
|
|
168
178
|
}
|
|
169
179
|
|
|
180
|
+
/** Count `bytes` the session answered a process's supervisor call with. */
|
|
181
|
+
export function recordSupervisorAnswer(bytes: number): void {
|
|
182
|
+
_counters.supervisorAnsweredBytes += bytes;
|
|
183
|
+
}
|
|
184
|
+
|
|
170
185
|
/** Set the install phase. */
|
|
171
186
|
export function setInstallPhase(p: InstallPhase): void {
|
|
172
187
|
_counters.installPhase = p;
|