WireBudget

Size budgets for anything assembled into a single DevTools message.

Every fan-out point that batches a variable number of records shares these numbers, so a frame stays in the same range whether it carries actions, network exchanges or log lines. Counting records instead was a reasonable proxy while records were small and uniform, but network exchanges carry full request and response bodies and are orders of magnitude heavier than a logic event, so a count-based cut says nothing useful about the resulting frame.

Usage:

var budget = WireBudget.MAX_PAYLOAD_BYTES
for (exchange in exchanges) {
budget -= exchange.approximateWireBytes()
if (budget <= 0) break
}

Properties

Link copied to clipboard

Slice size for streaming a single body that exceeds MAX_PAYLOAD_BYTES on its own.

Link copied to clipboard

Target ceiling for one message payload.