Fix counter reset handling.
Add cpi and cpld calculation.
Group the metrics per device and compute statistics between devices.
Fix memory calculation.
Use smaller json output format.