History log of /system/core/metricsd/uploader/upload_service.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0586504e01784b054944ca12f816880e27dfc2e7 15-Dec-2015 Bertrand SIMONNET <bsimonnet@google.com> metricsd: Persist the metrics to disk periodically.

Every now and then (5 minutes by default), the uploader will persist the
current metrics to disk to avoid losing them in case we exit
unexpectedly (reboot or crash).
When starting up, metricsd will load the previously saved log and resume
the metrics collection from there.

Bug: 25670584
Test: Unit tests.
Test: manual: restart metricsd. The saved log is detected and parsed
correctly.
Test: manual: Send a sample to metricsd, send SIGTERM to metricsd, the
log is saved to disk, metricsd restarts and picks up the log where it
left.

Change-Id: I4cefc62c7ea1fa51333d84d8a7ba0a2e9c7fd58f
/system/core/metricsd/uploader/upload_service.h
b6c77af4993b5e5a83fd1ed80309823e44f70650 09-Dec-2015 Bertrand SIMONNET <bsimonnet@google.com> metricsd: Cleanup on TERM signal.

metricsd should shutdown cleanly when receiving a TERM signal:
* stop the binder watcher.
* wait for the thread to quit.
* Exit cleanly.

Note: This is not directly used as we don't send SIGTERM on shutdown or
when stopping services yet.

Bug: 25670584
Change-Id: I878d1e67474c72d24790f3540470e37a23112a95
/system/core/metricsd/uploader/upload_service.h
146360b4a6fada80a78ea3b7adcf95d671cdd071 21-Dec-2015 Bertrand SIMONNET <bsimonnet@google.com> Fix documentation.

This fixes the documentation for UploadService and the README file:
* stop mentioning Chrome OS as we forked the code.
* update the histogram declaration workflow. It is not tied to Chrome's
histograms.xml file anymore.
* update the architecture explanation of metricsd. We split
metrics_daemon into two daemons and are now using binder to log
metrics.
* convert README to markdown to make it prettier when viewed in gitiles.

Bug: 26314417

Change-Id: I1e492f1211c1784e65dd4d3e473bb9aacefc3b5d
/system/core/metricsd/uploader/upload_service.h
6c9fbb9a3aaee50302d54de8f27fc712c836b9ea 21-Dec-2015 Bertrand SIMONNET <bsimonnet@google.com> 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
/system/core/metricsd/uploader/upload_service.h
6b8629a6490d01196368ae1ed5bc6967c6f127eb 18-Nov-2015 Bertrand SIMONNET <bsimonnet@google.com> metricsd: Log over binder.

This CL converts metricsd, libmetrics and metrics_collector to use
Binder to pass metrics samples.

Bug: 25670685

Change-Id: I657faecdf4ed1226ab30ce69e062028463437e7b
/system/core/metricsd/uploader/upload_service.h
9d3a4aeae2bd59ebe72fca44c4fa508c1e9f1333 25-Nov-2015 Bertrand SIMONNET <bsimonnet@google.com> metricsd: Use different directories for each daemon.

Instead of using a single directory for both the internal data of
metricsd and metrics_collector and the shared files (metrics samples log
file and the metrics enabled file), we should use separate directory to
allow for a finer access control.

The new structure will be:
* /data/misc/metrics for the files accessible to all daemons reporting
metrics, metricsd and metrics_collector.
* /data/misc/metricsd for the private files of metricsd.
* /data/misc/metrics_collector for the private files of
metrics_collector.

Bug: 25886951
Test: Unit tests.
Test: Manual: metricsd and metrics_collector run without errors.

Change-Id: I006d19f45f5f419d2b08744126c2e2a0b899c9fa
/system/core/metricsd/uploader/upload_service.h
608e428006fa317badd51b941e05bdba42bd08bd 13-Nov-2015 Bertrand SIMONNET <bsimonnet@google.com> 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
/system/core/metricsd/uploader/upload_service.h
e6b96d6d194b707ab8c5d9f7c54e7bd7c8a87302 30-Oct-2015 Bertrand SIMONNET <bsimonnet@google.com> metricsd: Report the model manifest id.

When the model manifest id is defined in weave, report it.

Bug: 25386505
Test: the model manifest id is uploaded when defined.
Test: If weaved.conf is not defined, metricsd uploads the default value.

Change-Id: Ic895671621fda9ce5cdeacdbdba58aa73a6887fc
/system/core/metricsd/uploader/upload_service.h
4c8a8ad3bf6d4906b29b2d11afd400f107ceec9a 09-Sep-2015 Bertrand SIMONNET <bsimonnet@google.com> metricsd: Add test case for the upload service.

This test case ensures that we can log a metric with the metrics library
and upload it with the upload service.

BUG: 22879646
TEST: unit tests.

Change-Id: Idf4a1240d41745ebf7835089230608082eed19f5
/system/core/metricsd/uploader/upload_service.h
1df10c43eab5b8c483fbf882a0c8a6e5e59c73c0 09-Sep-2015 Bertrand SIMONNET <bsimonnet@google.com> metricsd: Persist the report to disk if an upload fails.

If the metrics server is unreachable, we may need to resend a metrics
report later. Instead of keeping the staged report in memory, save it to
disk to avoid loosing data if the system restarts or crashes.

BUG: 23033262
TEST: unit tests.

Change-Id: Idd14964e40f022952469f47d675d8cda9586d7cd
/system/core/metricsd/uploader/upload_service.h
2765d0abccd0c754422332d114cdecc271888e2d 09-Sep-2015 Bertrand SIMONNET <bsimonnet@google.com> metricsd: Use the metrics directory everywhere.

Instead of passing different filenames around, only rely on the metrics
directory and infer the filepath from it. This makes testing easier.

BUG: 23939404
TEST: unit tests.

Change-Id: I79086acc3a546464114fa8ec4656ec04e1c43e35
/system/core/metricsd/uploader/upload_service.h
52e5b99983c1f7ff0b9a1f3b4b80d779073b21c8 11-Aug-2015 Bertrand SIMONNET <bsimonnet@google.com> metricsd: Relicense as Apache 2.

MODULE_LICENSE_BSD and NOTICE were removed as the license is no longer
different from the rest of system/core.

BUG: 23086670
Change-Id: I1e83ef2ecb9c721150f8aab283c9ff960337da8c
/system/core/metricsd/uploader/upload_service.h
da21ac0751a3abf3502ff74c5de7ad95db52ba30 10-Aug-2015 Bertrand SIMONNET <bsimonnet@google.com> metricsd: Rename metrics to metricsd.

This makes the import path less confusing:
* metrics/metrics_library.h is imported from the exported headers.
* metricsd/* for includes by the metrics daemon itself.

BUG: 22879597
Change-Id: I9f44ea3a548cae39d4546fcd724e8007f6dd4bd0
/system/core/metricsd/uploader/upload_service.h