MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / transform

Function transform

apps/cloud/src/observability/memory-metrics.ts:224–233  ·  view source on GitHub ↗
(chunk, controller)

Source from the content-addressed store, hash-verified

222
223 const counting = new TransformStream<unknown, unknown>({
224 transform(chunk, controller) {
225 const written = byteLengthOf(chunk);
226 const writeAt = Date.now();
227 connection.chunks += 1;
228 connection.bytes += written;
229 connection.lastWriteAt = writeAt;
230 totalBytesForwarded += written;
231 maybeEmitPeriodicSnapshot(writeAt, OTEL_MAX_SPAN_QUEUE_SIZE);
232 controller.enqueue(chunk);
233 },
234 flush() {
235 closeConnection(connection, "normal", OTEL_MAX_SPAN_QUEUE_SIZE);
236 },

Callers 3

planAuthConfigMigrationFunction · 0.85
composeSpecTransformsFunction · 0.85
stripTypeScriptFunction · 0.85

Calls 2

byteLengthOfFunction · 0.85

Tested by

no test coverage detected