Address ag/11439257 leftover comment
This change adds an unknown state in DataSubscriptionState
enum in order to pass server side compatability warning.
Besides, this change also address ag/11439257 leftover comment.
Test: build
Bug: 148905838
Bug: 129082217
Change-Id: Ib831832f2a24cf4c5ca64b078998fd93fed3793e
Previous default for InitialValue was FALSE. Currently, no predicates
configure this field.
Added unit tests to test the initial condition changes in Value and
Count metrics.
- ValueMetricE2eTest.TestInitialConditionChanges
- CountMetricE2eTest.TestInitialConditionChanges
Bug: b/156541904
Test: m statsd_test && adb sync data && adb shell data/nativetest/statsd_test/statsd_test
Change-Id: I242bcb0b60455355e699636aae7e620fabc310ef
In ValueMetricProducer, we now map the new and old state values from
onStateChanged to their correct group ids (no mapping happens if the
metric has no state map). We then check if the group ids are the same
and return if they are. Having the same group id means that the state
values are in the same group and no pull is needed.
onStateChanged was updated to take state values stored in FieldValue
objects instead of as ints. This makes it easier to utilize the
mapStateValue function in MetricProducer.
Bug: b/156428844
Test: m statsd_test && adb sync data && adb shell
data/nativetest/statsd_test/statsd_test
Change-Id: Id8f110db593470b8923e7c4259d70cc5f5bc9147
Currently, modify MobileBytesTransfer(ByFgBg) to add dimension
for rat type and subscription is not backward compatible since
callers might expect a complete statistics in a metrics with
specific uid.
Hence, create a new atom to report data usage per rat and per
subscription.
Test: build
Bug: 148905838
Bug: 129082217
(cherry-picked from ag/11439257)
Merged-In: Id1c8673d92038552c2393b017f5723fd5c79ab45
Change-Id: Id1c8673d92038552c2393b017f5723fd5c79ab45
Whitelisted atoms can be logged from any app so integrity of StateTrackers
for those atoms cannot be guaranteed.
Fixes: 155522551
Test: statsd_test
Change-Id: Ifc64e9168ee5f1f8977b99534319bc65946630f0
Get whitelisted atom ids from StatsdConfig which can be logged from any
uid.
Fixes: 155521934
Test: statsd_test
Change-Id: Ib2db310d1cd8479d4996e70ac09d40e8dc45af48
The referenced object could be destroyed and result in native crash when
mCallback is used.
Bug: 156536687
Test: manual test with registering a section from an app
Change-Id: Ie36c0e6e64be1246539f12999f037c24377686dd
Cherry-pick from master to rvc-dev.
Bug: 150519505
Test: m statsd
Change-Id: I44aaa3e2293b8ea956180bce3e1fc854a4d0bca7
Merged-In: I44aaa3e2293b8ea956180bce3e1fc854a4d0bca7
Signed-off-by: Denny cy Lee <dennycylee@google.com>
(cherry picked from commit e6d42a42b4)
This CL removes the string field from the TvSettingsUIInteracted atom to
eliminate the risk of logging sensitive information by accident. This
change should be safe as no such log has been uploaded to Google server
yet.
Besides the change to the atom, this CL also made some corresponding
change to the enum file so fill in the information that was collected
using a string.
(This CL is a mirror of cl/310419842 to Android repo.)
Metrics council review bug: 151768952
Bug: 150979527
Test: the Android tree still builds normally
Change-Id: I8a9d8c95ec06eaa2cbe097efe652e18d0e7baeac
Charging status is different from plugged status and can be used as a
state for certain metrics.
Bug: 140496920
Bug: 143495340
Bug: 145838040
Test: bit statsd_test:*
Change-Id: I1ef41191588b6d26346323203dabe488d488c131
If a pull happens at the same event time, we should reuse the existing
data, regardless of whether or not the cool down has been met. For
example, if an app upgrade happens at time t, and two metrics need to
pull atom a, if metric one pulls at time t, but metric two initiates the
pull at time t+2, we should still reuse the pull from time t since that
is when the app upgrade happened.
Bug: 156294650
Test: atest statsd_test
Change-Id: I4efc49545093f6683bf6dd89ed68c5dfa5b44d8f
This prevents subtle bugs from being introduced when more member
variables, such as annotations, are added to LogEvent.
Test: m statsd
Test: atest statsd_test
Test: atest GtsStatsdHostTestCases
Bug: 156312371
Change-Id: Ibb5366e8658d6c99e5730b4bc301190655bbd245
This change adds EvsUsageStatsReported that contains various usage
statistics collected by EVS service.
Bug: 153236752
Test: $ANDROID_HOST_OUT/bin/statsd_testdrive 274 after allowing
AID_AUTOMOTIVE_EVS to log
Change-Id: I99fe24d7679678e8bb3fa779f299f253a9e703f0
This CL creates a sendHeartbeat thread that ocassionally sends
heartbeats, consisting of a dataSize of 0, to perfd. perfd will discard
those heartbeats, recheck if the user has canceled the subscription, and
if not, wait for more data from statsd. Sending heartbeats solves two
big problems:
(1) Allows statsd to robustly check if writes to the socket fail because
the read end of the pipe has closed. Previously, if no atoms were pushed
or pulled, statsd never attempted to write to perfd, so statsd could
never detect the end of the subscription. However, now, writes are
regularly made regardless of if statsd receives data. Note that even if
atoms were pushed or pulled, there is no guarantee that they would have
matched the atom matchers sent in perfd's config.
(2) Allows perfd to escape a blocking read call and recheck whether the
user has canceled the subscription. If no data is sent to perfd, perfd
will block in this read call and the AndroidStudio UI will freeze up.
Heartbeats are only sent if statsd has not sent any data to perfd within
the last second, so we do not spam perfd with writes.
+ decomposes the startNewSubscription function
+ prevents startPull from holding the lock while sleeping
Test: atest stastd_test
Test: atest CtsStatsdHostTestCases
Test: manually confirm that AndroidStudio is not freezing
Bug: 153595161
Change-Id: I78f0818e8ed29bdadd02c151444ee7c9555623a4