Commit graph

9 commits

Author SHA1 Message Date
Howard Ro
d173009c74 Make native metrics logger write to statsd socket
Previous submission of this change, aosp/790068, caused a failure in
sdk_mac for CLOCK_REALTIME and <endian.h> not being available.

Bug: 110537511
Test: compiles without failures and verified the correct metric
Change-Id: Iba1dc920ad82e88a4bcdd2feaee9a06202a440c2
2018-10-24 15:19:14 -07:00
Howard Ro
44874e5b0e Revert "Make native metrics logger write to statsd socket"
This reverts commit 34bc567a93.

Reason for revert: build failure

Change-Id: I67e0270051a82db7f524ed219316f02f2766d6e1
2018-10-19 01:41:07 +00:00
Howard Ro
34bc567a93 Make native metrics logger write to statsd socket
Bug: 110537511
Test: compiles without failures and verified the correct metric
Change-Id: Ie8019a20a2112ed6cbbc0999d68592efb8f0f538
2018-10-18 10:39:40 -07:00
Yao Chen
763e3aee42 Reset statsd writer to init state after close
Bug: 117796113
Test: locally tested and verified stats logs can write to statsd again.
Change-Id: I33b006199d23f851ff1a6e49445fb16d74223062
2018-10-15 16:12:48 -07:00
Yao Chen
602d292cb1 Add an API to release stats logger resources.
Test: tested with ag/5112579
Change-Id: I271b7574beab1baa9886d31bc1cf25c40c2fae23
Merged-In: I271b7574beab1baa9886d31bc1cf25c40c2fae23
(cherry picked from commit 5b63e2704a)
2018-10-03 10:43:21 -07:00
Yao Chen
6301054b38 Add a function to allow statslog failure.
+ Record all types of failures which lead to log loss
+ Only record eventual failure after the retries to get a accurate log loss count.

Bug: 80538532
Test: manually tested

Change-Id: I23a55e62e140bf22ae5aa9e6c40539d51149cd66
Merged-In: I23a55e62e140bf22ae5aa9e6c40539d51149cd66
(cherry picked from commit ad3a40bf76)
2018-10-03 10:42:34 -07:00
Yao Chen
4d1deed139 Remove a redundant check in statsd socket code.
The original liblog code has this additional check because there may be multiple writers registered,
there is a for-loop and the retVal is set to be the FIRST error. Statsd doesn't need it because it
 only has one writer.

Test: locally tested.
Change-Id: I03f0015d0c29eba19eb2b5ea145380cb98fb2509
2018-05-22 16:06:21 -07:00
Yao Chen
bc586d15d3 Add OWNERS file for libstats/
Test: N/A
Change-Id: Ic16b0e1330ff46bfea9524eacf109c4ded430c67
2018-05-21 10:12:49 -07:00
Yao Chen
b3be9eaff5 Move libstatssocket from frameworks/base to system/core/
So that lmkd can build on PDK.

Bug: 79349329
Test: builds locally
Merged-In: I981e6ef9f9769b873640e5f169a9495ccea2f25c
Change-Id: I981e6ef9f9769b873640e5f169a9495ccea2f25c
(cherry picked from commit b13a102c0a)
2018-05-21 10:06:25 -07:00