Merge "Implement stats logging for Compatibility API."