zoekt
zoekt copied to clipboard
webserver: fix stats calculation
Memory is our dominant cost factor for operating Zoekt. When evaluating alternatives to Zoekt in the past, we struggeled to get good numbers for MEM/Megabyte of indexed data. Compound shards complicate this issue, because the MEM footprint of a repo within a compound shard is different from its footprint as a simple shard. Additionally, a part of the index is memory mapped, which is something we should probably keep track of separately.
calculateStats
is supposed to serve this purpose, but it needs an overhaul. See comments in the code.