Fix compile error only on archive/device.

Simulator is unaffected!
Slim down data saved from stats APIs