We are playing around with a new projection for building report on different types, counts and the size of the events (our disk usage is through the roof)
The way we are calculating an estimate if disk usage is this function:
getSizeOfDataInBytes = (e) => {
return JSON.stringify(e).length;
}
Take the whole event, convert to a string, and .length is the number of bytes.
Now, I my guess is the data is being written in unicode, so I could take that into consideration, but the state we have coming out are no where near the actual size of the chunk files.
We did a clean load of an eventstore with some data.
Chunks files are 3.2gb
Are rough calculation is 900mb with the function above, so say we took unicode into consideration (2 bytes right?) we would still be well short of the 3.2gb.
Any thoughts on this, or I am on the wrong route for trying to do this from a projection?