When statsd pulls data from StatsCompanionService, the data is put into
log_msg format on java side and expanded into LogEvent on cpp side.
There is a lot of dependency on log_msg and liblog to add new types.
There is pending bug to rewrite thta part of the code in statsd to
completely rid the legacy of logd and liblog. But that may not happen
soon.
Now we can support new storage type.
Also no need to specify number of fields in StatsLogEventWrapper cstr,
which is a source of bug in P.
Bug: 115775035
Test: manual test and cts test
Change-Id: Id1f0b033885da6f3bcebe043968061821db48f35
Adds 4 fingerprint atoms: NumFingerprints,
FingerprintAcquired, FingerprintAuthenticated, and
FingerprintErrorOccurred. Right now, these should have a 1-1 mapping
with dumpsys fingerprint. More acquire and error codes can be added
pending Metrics Council approval.
Note: I do not know how to test crypto fingerprints,
Note: Most of the logging likely fits better in BiometricService, but
given that it shares code with FaceService and we do not have approval
to log FaceService, I had to put the logic in FingerprintService.
Bug: b/113129470
Bug: b/113129210
Bug: b/113128442
Bug: b/72342203
Test: manually tested adding fingerprints and acquire/accept/reject/lockout with multiple users
Test: will make cts test
Change-Id: Ia8ca703bd4090f0f3612c6415785288517073117
Add battery voltage to statsd as a pulled atom.
Bug: 114451845
Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.HostAtomTests#testBatteryVoltage
Change-Id: If40ed41663b57ad6144c69c52c4c63562f93c774
- call LooperStats.reset() from StatsCompanionService
- add screen_interactive to the LooperStats atom
- temporarily set uid = 1000 to avoid statsd warnings that the uid is invalid
Bug: 113651685
Test: Manual and UTs
Change-Id: Iacf45fcb746c6bb9837456a2a0c74f5a073ff822
mCoolDown is ns, changing to match others.
Note: actual polling is controlled from server side, this is only to
change device side cooling down threshold.
Test: Build
Bug: b/112432890
Change-Id: If709e0457ea3f170a40229bac0fd3252c93ad1f3
Java trace dumps can take significantly longer than 30 seconds. Testing
suggests that 2 minutes should be ample time.
Bug: 111729299
Test: 'adb shell incident' and ensure the section doesn't time out.
Change-Id: I35e09fc1ca608122a1a352985ea3741f6ea0a344
There are cases where dumping Java traces times out and then later tries
to write to a closed pipe, causing incidentd to crash. This introduces a
handler for the SIGPIPE signal so it doesn't crash due to a closed pipe.
Bug: 111729299
Test: lower section timeout to 5 seconds and make sure incident service
doesn't crash
Change-Id: I868aba1ae21a50ae76977e0e09e782cf94198473
Check the results for an error when generating a screencap so invalid
data is not returned as the captured image.
Test: screencap works
Change-Id: I377c11c1e07cd04a6b3882ac20d7be9d6ddb25c5
Fixes: 80106675
There will be followup cls to add support of new types that can be
nested and repeated.
+ skip StatsLog.write signature generation for pulled atoms.
Bug: 113872139
Test: manual test
Change-Id: I69d0ee0b2fe8e286e48eac20ec2c8b280c477bf0
KernelWakeupReported is logged from a different location than the one
currently stated. This fixes this.
Test: none; just a comment.
Change-Id: I06b36969e695d7d1e16d9bd3e8ce535c15eb1c17
This reverts commit 6188aa3294.
Reason for revert: ag/4819964 has now been submitted. undoing the roll back.
Test: revert
Test: manually verified output is the same as diskstats.
Change-Id: I9a3292f66e1e28661e1d29f3befd002073b681c1
In ag/4888395 we get rid of wall-clock time from EventMetrics because it
is very RAM-costly. If someone needs the wall-clock time, they can get
it from this atom instead. This way, the wall-clock time is only stored
when interesting, instead of every single event!
Bug: 113072343
Test: manual confirmation that it works
Change-Id: I10c26a4fc9c73b29233108ef1fc0e9797382a8df
EventMetricData stores wall_clock_timestamp_nanos.
It is expensive, costing 10 bytes per event and evidently not needed.
Similar for GaugeMetricData.
Bug: 113072343
Test: make -j8 statsd_test && adb sync data && adb shell data/nativetest64/statsd_test/statsd_test
Test: run cts-dev -m CtsStatsdHostTestCases
Test: Manually confirm that events/gauges don't have wallclock
Change-Id: Iae978a434354c049e1fa61d42536be981c862b4f
Previously, fdopen was being called on a file descriptor that was owned
by a unique_fd without releasing. This leads to a double close, since
both fclose and the unique_fd destructor will try to close the fd.
Bug: http://b/113880863
Test: treehugger
Change-Id: I6f6f48d304861b5e4d7efee0d3ad0e30178a95a4
Adds LooperStats and LooperStatsService which set a static
Looper.Observer to record the count of dispatched messages and
cpu/latency information. The aggregated stats are collected by
Westworld as pulled atoms.
The collection is disabled by default and requires a manual call to
enable:
adb shell cmd looper_stats enable
Test: Unit tests and tested manually that the collected data seems
reasonable.
Change-Id: I7162fbca4e324f62887f95df3405205cbe4416ca
The list of events in this file is meant to be used with Generic Atom
defined in atoms.proto in statsd. Instead of unique int, we would like
to log it with an enum that shows semantic meaning of events. Also, this
change re-sorts imports and removes unused imports and remove the
previous logging line to test GenericAtom.
Test: statsd_test
Change-Id: Ia9335e48ada68bee6d716ad4d7ac50238932da95