Switch user crash event notification from D-Bus to this Binder service.
Add a trampoline as a go-between for the -frtti and -fno-rtti sources.
Add MetricsCollectorServiceClient for crash_reporter to use, hiding the
binder proxy details.
Remove D-Bus message filtering from metrics_collector.
Bug: 25929888
Change-Id: Idcdd60ac476340fb11602fc9afab6cd87843e529
This CL adds a dump command to metrics_client that will dump the
histograms, aggregated by metricsd since it started, in a human readable
format.
This is useful for developers to ensure that their code uses libmetrics
correctly and the reported values are correct.
Sample output (redacted to fit the commit message):
$ metrics_client -d
Histogram: hello recorded 5 samples, average = 54.8 (flags = 0x1)
0 ...
9 --------O (1 = 20.0%) {0.0%}
16 O (0 = 0.0%) {20.0%}
29 --------O (1 = 20.0%) {20.0%}
54 ------------------------O (3 = 60.0%) {40.0%}
100 O (0 = 0.0%) {100.0%}
$
Bug: 25817310
Test: * Send a histogram with metrics_client.
* `metrics_client -d` shows it.
Change-Id: Id186dc5463403ca9181ee9eef8f46b5e809b8714
This CL converts metricsd, libmetrics and metrics_collector to use
Binder to pass metrics samples.
Bug: 25670685
Change-Id: I657faecdf4ed1226ab30ce69e062028463437e7b
metrics_daemon should never get a stale answer on whether or not the
metrics are enabled.
This is important as metrics_daemon will be the "source of truth" for
other components.
BUG: 24386281
TEST: unit tests.
Change-Id: I573568abe5d1b840683cede2fdf32cdae028a81a
We cached the enabled status for metrics as a static field in the
metrics library. This field is not reset in between tests which treats
the metrics as enabled if they were enabled previously.
None of the users rely on the caching being static so the cached status
was changed into a field.
Also enabled the metrics in upload_service_test.cc after verifying that
the test failed consistently.
BUG: 24473349
TEST: unit tests.
Change-Id: If05fdca644016d923aa7b1978db5e74ada563c1a
Move metrics_library_mock.h and timer_mock.h into the include/metrics/
folder since some source files in shill need to include these header files.
Adjust the include paths in metricsd source files accordingly, and add
the -frtti flag to the libmetrics target so that classes including
these mock headers can determine the type information of the underlying
class being mocked at run-time.
BUG: 22956441
Change-Id: I19820c0d3097c9c4c2b93730d1988ccec563db23
TEST: "mma" in metricsd folder succeeds.
Move timer.h into the include/metrics/ folder since some
source files in shill need to include this header file.
Adjust the timer.h include paths in the metricsd accordingly.
BUG: None
Change-Id: Id2f5e079d3a095f40d0f4d4e0d438bd22f1274ff
TEST: "mma" in metricsd folder succeeds.
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
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
This cleans up the unit tests and update them to pass.
Cleaned up:
* removed the irrelevant bits.
* Used ScopedTempDir for all test specific files (instead of the current
directory).
* Update some objects to make them more easily testable.
* Group all the test in a single binary and use bionic's test runner.
BUG: 23682444
Change-Id: I289e3a5ff89968fdecd4a156e93bc38bbc25f58b
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