Issue #1733674 by markpavlitski, marcingy, and Jeremy: only collect statistics if enabled, disable by default.