zoekt
zoekt copied to clipboard
stats: keep track of the size of the memory-mapped part of the index
Updates #321
See the linked issue for context.
- It's not clear whether we need to know how much data is mmapped and whether it should influence e.g. our recommendations regarding the expected amount of resources provisioned to zoekt, but at least it was instructive to find out (we mmap around 45% of the total indexData memory). The downsides are the API change to indexData.memoryUse() and the increased amount of time this method takes. Please comment if you don't think we need this info. My opinion: while I'm not sure we do, it doesn't hurt much.
- Most tests are ignoring IndexBytes field, and rightfully so. I've tried to remove IndexBytes from such tests. The ones that do not ignore it are left to catch a possible regression.