metrics_daemon: add zram stats collection

Memory compression stats are being collected by Chrome, but it
is more natural to do it here since they are system-wide rather than

In addition, this provides better granularity for the compression ratio
(percents, from 100% to 600%) since we're especially interested in the
distribution of values between 1 and 2, and currently these all fall
in the same bucket.

Finally, we collect more interesting stats on zero pages.

TEST=unit testing, checked about:histograms

Change-Id: I09c974989661d42f45d44afd428e8114e4ee1dbd
Reviewed-by: Luigi Semenzato <>
Commit-Queue: Luigi Semenzato <>
Tested-by: Luigi Semenzato <>
3 files changed