Add memuse stats and fix disk I/O computations.

This changes adds memory usage stats after 1  5, 30, 150, and 750
minutes of active use (approximated by wall
clock time minus sleep time).  We log only the anonymous memory
usage (active + inactive) as we expect that other types of
allocations would not convey much additional information.

This also fixes the disk I/O computation to use actual active
time elapsed between callbacks, instead of assuming the expected
interval has elapsed.  The existing code causes errors in
both directions when a suspend/resume cycle occurs between callbacks.

TEST=verify that about:histograms page contains Platform.MemuseAnon1 after 1 minute and Platform.MemuseAnon2 after 5 minutes.

Change-Id: Ib32d915fac7766a9fca7125105224889ea93050e
Reviewed-by: Darin Petkov <>
Tested-by: Luigi Semenzato <>
3 files changed
tree: 613c0422cf7db438a9640186814a713fda267b0b
  1. metrics/