Commit graph

7 commits

Author SHA1 Message Date
Alex Vakulenko
eca14e3722 metricsd: Removing brillo::Any from weaved's public APIs
Weaved replaces brillo::Any with base::Value in its client library,
so need to update clients.

Also this removes last D-Bus dependencies from metrics_collector.

BUG: 26558300
Change-Id: I82d571d7e2bd17347daeb1b70f48ec05378894f0
2016-01-28 14:44:28 -08:00
Alex Vakulenko
ea05ff9229 crash_reporter/metricsd: Update libchrome APIs to r369476
The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.

Change-Id: I9e45975cdef43913270b82e3fca2c027e614a464
2016-01-20 13:43:30 -08:00
Bertrand SIMONNET
6c9fbb9a3a metricsd: Replace scoped_ptr with unique_ptr.
scoped_ptr are a chromism. We should use unique_ptr instead.

Bug: 25958769
Test: unit tests.

Change-Id: Ie23ae2ef42f66dcc76f45a9dafa66c8ceb0a2d90
2015-12-22 09:18:04 -08:00
Bertrand SIMONNET
608e428006 metricsd: Split into two daemons.
This CL splits metrics_daemon into two independent daemons: metricsd and
metrics_collector.

* metricsd will be responsible for reading the metrics from disk and
  periodically uploading them to the server.
* metrics_collector will be responsible for gathering generic metrics
  from the system and managing the weave state for metrics.

This refactoring is necessary to prepare the migration of metricsd to
log over binder.

Bug: 25670908
Test: Unit tests.
Test: manual: both daemons run. Metrics are logged, uploaded and the
      weave interaction works.

Change-Id: Ib00e1772bb7eec87cbcdcd912c30b555d79d7074
2015-11-18 09:54:16 -08:00
Bertrand SIMONNET
0ada2ca1dc metricsd: Collect average cpu usage information.
Collect a new histogram (Platform.CpuUsage.Percent), collecting the
average cpu usage in percent of the total cpu usage possible (across all
cpus).
This measurement is collected every minute.

Bug: 25231576
Test: unit tests.
Test: Manual testing.

Change-Id: I1c63486c177f0c2d4bd361eb9e351a7ca25b80d9
2015-11-04 12:14:13 -08:00
Bertrand SIMONNET
7a9640559b metricsd: Only collect metrics over a short period.
Instead of reporting the metrics over both a long and a short period,
collect and report only over a short period. This makes the code simpler
and the metrics easier to understand.

Also move the collection out of metrics_daemon and into a separate
collector to make it simpler to understand.

BUG: 24464945

Change-Id: I17e52536aaa75321a5e34f42ed488545c2c3efde
2015-10-01 16:45:56 -07:00
Bertrand SIMONNET
5658dc58aa 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
2015-09-24 15:38:36 -07:00