Merge "Add stats support for existing optimizations"