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
The format of the metrics dump is rudimentary just yet. Here is an example:
Metrics from /data/misc/metrics/uma-events
name: hello type: USER_ACTION
name: world type: USER_ACTION
This required the following changes:
* Added -d option to metrics_client
* Refactored file handling in SerializationUtils
- Factored out file opening and log parsing into helper methods
- Added ReadMetricsFromFile which is read-only so does not truncate the file
Change-Id: I6032d74242c79c678ec42a14e78fccc54e7af455
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
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