In the benchmark code I measure each update individually, and the size of the complete document
docSize. You can listen to single updates and then get their byte-length. Or you can transform the complete Yjs document to an update and then read the size. It is impossible to know beforehand how large a document is. Although the document might have 10k updates, the size of the document could be 100 bytes because of compressed encoding.
You can, however, estimate the size of a document based on the content (for text documents, Yjs incurs about 53% overhead), or based on the stateVector of the document. But in your case - a 3d application - the only reliable way to measure the size of the document is with