metricsd: Report the data partition usage.
metricsd should report the stateful partition's usage, both in MB and as
a percentage of the available space.
This measure will be reported every 15 minutes.
BUG: 24132871
Change-Id: I1cd8d651a980f90a57be9cc2a5baf6ed59794470
diff --git a/metricsd/metrics_daemon.cc b/metricsd/metrics_daemon.cc
index b0e4b2f..b831ff2 100644
--- a/metricsd/metrics_daemon.cc
+++ b/metricsd/metrics_daemon.cc
@@ -278,6 +278,7 @@
diskstats_path_ = diskstats_path;
scaling_max_freq_path_ = scaling_max_freq_path;
cpuinfo_max_freq_path_ = cpuinfo_max_freq_path;
+ disk_usage_collector_.reset(new DiskUsageCollector(metrics_lib_));
// If testing, initialize Stats Reporter without connecting DBus
if (testing_)
@@ -492,6 +493,7 @@
}
void MetricsDaemon::StatsReporterInit() {
+ disk_usage_collector_->Schedule();
DiskStatsReadStats(&read_sectors_, &write_sectors_);
VmStatsReadStats(&vmstats_);
// The first time around just run the long stat, so we don't delay boot.