The encoded size of one empty frozen-page response frame: the protobuf message plus the 5-byte gRPC length-prefix. The budget reserves this overhead before dividing, exactly like the legacy JSON frame budget.
()
| 172 | /// message plus the 5-byte gRPC length-prefix. The budget reserves this |
| 173 | /// overhead before dividing, exactly like the legacy JSON frame budget. |
| 174 | fn empty_page_frame_overhead() -> usize { |
| 175 | let empty = crate::atomic::LoadFrozenEnvelopesResponse { |
| 176 | page: Some(crate::atomic::FrozenPage { |
| 177 | fragments: Vec::new(), |
| 178 | next: Some(crate::atomic::PageCursor::default()), |
| 179 | }), |
| 180 | }; |
| 181 | empty.encode_to_vec().len() + 5 |
| 182 | } |
| 183 | |
| 184 | /// The legacy budget math: reserve the worst-case metadata and four |
| 185 | /// payload bytes per budget byte, then clamp to the page size. |
no test coverage detected