for (Future<?> f : futures) {
f.get();
count += WORK_UNIT_SIZE;
if (count >= LOG_INTERVAL) {
total += count;
JVMEnvironment env = new JVMEnvironment();
log.info("{} X/tag rows computed ({}MB heap)", total, env.getUsedMemoryMB());
if (env.getPercentUsedMemory() > 95) {
log.warn("Memory is low. Increase heap size with -Xmx, decrease new generation size with larger " +
"-XX:NewRatio value, and/or use -XX:+UseCompressedOops");
}
count = 0;
}