Estimated source bytes for a pending op, taken from its listing metadata.
(op: DocOp)
| 108 | |
| 109 | /** Estimated source bytes for a pending op, taken from its listing metadata. */ |
| 110 | function estimateOpSizeBytes(op: DocOp): number { |
| 111 | // Skip ops load no content (just a row insert), so they do not count against the |
| 112 | // in-flight content budget. |
| 113 | if (op.type === 'skip') return 0 |
| 114 | const size = op.extDoc.metadata?.fileSize ?? op.extDoc.metadata?.size |
| 115 | return typeof size === 'number' && Number.isFinite(size) && size > 0 |
| 116 | ? size |
| 117 | : DEFAULT_OP_SIZE_BYTES |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * Splits content ops into sub-chunks bounded by both a count (maxCount) and a summed |
no outgoing calls
no test coverage detected