In beta 4, activeEventActivation proto object does not have a state
field and assumed to be active if it is written to disk. In beta 5, we
add a state field to support persisting metric activation status across
a system server crash. However, if a device updated from beta 4 to 5, we
don't have any knowledge of the state when we read. Therefore, assume
the lack of the state field as the event activation should be active for
the provided ttl.
Bug: 134795027
Test: used flashstation to flash a device to beta 4. Then manually push
and activate a simple config. Then use vendor/google/tools/flashall to
update to qt-dev + this change. Manually ensure metric/config are still
active.
Test: gts-tradefed run gts-dev --module GtsStatsdHostTestCases
Test: bit statsd_test:*
Change-Id: I8594d04efaa2ae1f669113aaffd33e5fa5851e73
We used a whitelist to determine which atoms should have their
timestamps truncated to the nearest 5 minutes. This changes the logic
to a blacklist so that we can get fine grained timestamps from vendor and
mainline atoms. Also reserves a range for atoms that need to be
truncated in the future.
Bug: 134574701
Test: inspected generated statslog.cpp file to make sure it had the
correct blacklist
Test: testdrive on ScreenStateChanged to ensure timestamps are preserved
when they should be
Test: testdrive on CallStateChanged to ensure timestamps are truncated
when they should be.
Change-Id: Id3468542c830cdf41395a94c77f7df0b46cd11b7
Previously,we could only have one deactivation matcher for a given
metric. This meant that the same matcher could not be used to cancel
several (or all) event activations of a metric. This fixes that bug.
Test: bit statsd_test:*
Bug: 134185513
Change-Id: I9d74878c9e09bd1f58c8f3dcffe1092edf490329
A condition was reversed in code refactoring during previous code review.
Test: unit tests added for all 4 combination cases.
Bug: 134417583
Change-Id: Id79a827ec7a5404b9006769f9595de773b4724ef
Treat metric activation like conditions as much as possible. Keep track
of condition changes even when metric is not active. Right now, we
ignore all condition changes if metric is not active.
This is a band-aid fix. Ideally, we should re-think how metric activation is
implemented and consider implementing it as a condition with a timebomb.
Bug: 130838341
Test: statsd_test
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t
android.cts.statsd.metric
Change-Id: I96bb7a7c6ee88359f310065e166f858be945eaff
All new code in LMS wrapped with try/catch and swallowing exceptions
to make sure new code never crashes LocationManagerService.
Bug: 133906682,133190291
Test: Tested with (statsd_testdrive + gnss test apk). Work as intended.
Change-Id: I989b1361c029e76d35861cf23d5c3d152f0bf81a
This reverts commit ee615d6ed597bf558b526dcfb87c993fe0fb6648.
Reason for revert: We will be adding these in a later release.
Test: None
Change-Id: I7cee23d246b7677a79a9055976e27a10a55efb1c
Bug: 131921165
StatsService to update UID data and overflows kernel transfer buffer.
In this case, the IPC call silently fails. The issue was discovered in Android Automotive Embedded use case that employs multiuser setup. This causes more uid data being sent via one-way StatsCompanionService::informAllUidData call than usual and can trigger the issue. As the result, uid map on statsd side is empty and many metrics are not captured.
Bug: b/132444397
Fixes: b/132444397
Test: Did a clean build of master branch and flashed the device. adb
shell cmd stats print-uid-map returned without any result. Repeated the
steps after implementing the fix, print-uid-map returns the results now.
Change-Id: I1451c13b36696449c145c51618c68d10e29a596a
This will enable us to breakdown number of alarms triggered by
app standby bucket.
Bug: 132227621
Test: statsd_testdrive 35
Change-Id: I4cb6c1e631ac940bedaff734cc40b1512405bf33
Stores experiment ids to disk for watchdog rollback initiate/success
events as discussed.
Test: gts in topic
Bug: 131768455
Change-Id: I32768fe5c5c21c43811e25d8f87faae0c8d82c1f
Modifies statsd_testdrive to allow up to 100 atoms to be pulled at a
time. Uses trigger event with app breadcrumb so that the puller happens
once.
Bug: 128893770
Test: statsd_testdrive 10021 (temperature)
Change-Id: I185a7eb1b32a6b19596601dcf5a1ba7a633e4e35
This fields enable us to slice job metrics by bucket and gain insight
to the average time spent executing jobs in each bucket. The metrics
we'll write for this data will help to tune thresholds for throttling
background behavior in Q.
BUG: 132227621
Test: make statsd_testdrive && statsd_testdrive 8
Change-Id: I1af94dc4a8e51f9741f48c817d1d2f99f164858d
This atom contains information about historical AppOps performed by
applications.
Bug: 128925078
Test: builds
adb shell cmd stats pull-source 10060
Change-Id: Iaaec0987712779e2062139d3ad0e2d4544d4d45f
Previously, all metrics/configs would deactivate on system server death.
Now, active status is restored.
Bug: 129717537
Test: bit statsd_test:*
Test: libprotoutil_test:ProtoOutputStream*
Change-Id: Idf372457f60a931a2d00176a5eab58c534a25e41
CTS test for StatsLog.writeRaw(). Tests writeRaw using the app
breadcrumb atom to get some cts coverage.
Test: cts-tradefed run cts-dev --module CtsStatsdHostTestCases
Bug: 130238616
Change-Id: I44d4a0e618617002c9ff55cfe86fd1cbf29116c5