The field of the FieldValue was not properly being set in LogEvent for
many of the types in the KeyValuePairsAtom.
Test: manual inspeciton of logcat
Test: modified unit tests and made sure they passed
Change-Id: I445a2d3051cfa86affe45ea9a3fe69794f962eff
HardwareErrorCode was not updated when it was changed in the
(Pixel)Stats HAL.
Bug: 123712037
Change-Id: Id4670f110ffebd9f794bd555deb14849919dbf75
Signed-off-by: Maggie White <maggiewhite@google.com>
* Logs when a Bluetooth socket's connection state is changed
* A Bluetooth socket can be:
- RFCOMM socket
- SCO socket
- BR/EDR L2CAP socket
- BLE L2CAP socket
Bug: 112969790
Test: make, test drive with statsd
Change-Id: I97b1e650e197a0dad1e2959e2f5b4dd98370d892
Pull all state for all dangerous permissions of all apps.
Test: adb shell cmd stats pull-source 10050
atest CtsStatsdHostTestCases:android.cts.statsd.atom.UidAtomTests#testDangerousPermissionState
Bug: 123661303, 123594188
Change-Id: I4060282f58220ea514b13865d7cad04e10af90e4
Also add a prototype for a future system-api accessible metrics file
that will be auto-generated from atoms.proto
Test: - ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissoncontroller 170
- triggered permission request
Bug: 123594188, 123663448
Change-Id: Icede6ff1f12ca79ebad6267c045a4fb3a9955402
Statsd unit tests relied on temperature atom. Since this atom is now
pulled by SCS, it no longer works on unit tests. We should figure out
why SCS pullers fail in unit tests, but in the meantime this cl changes
the tests to use full battery capacity.
Test: tests now pass on blueline
Bug: 123530679
Change-Id: I17c5cd67c6bf64a4b572de0a88c7abe73e0fe87b
The definition of app process start time is from the app
launch time to the time that Zygote finished fork the app process and
loaded the application package's java classes.
The app process can be started for any component including activity,
service, content provider, broadcast receiver or other, either in
foreground or background.
The difference of this atom from existing atom like AppStartOccured
is that this atom can report start time for both foreground and
background process.
Bug: 122356380
Test: NA.
Change-Id: Ifcc0c80f1da45c2ff89f7c88da6407ba777473e2
Create a new atom RoleHolder that maps a uid -> role and add the
mappings that currently exist in RoleManagerService
Test: - ./out/host/linux-x86/bin/statsd_testdrive 10049
- adb shell cmd stats pull-source 10049
Bug: 123594188
Change-Id: Ib0fa60b07a95c06a219f3e3b37d51f59b624a017
This adds to PulledAtomStats and creates a new stats atom AtomMetricStats.
Test: none
Bug: 123572169
Change-Id: Ifea682005210a6342a027643e162f8ce7785cb06
* BluetoothHciTimeoutReported is logged when Bluetooth controller
failed to respond to an HCI command in time
* BluetoothQualityReportReported is logged when Bluetooth controller
sends a link quality report event to Android host due to bad link
quality
* BluetoothManufacturerInfoReported is logged when we learn about
manufactuer defined metadata for a device such as manufactuer name
model number, software version, and hardware version
* BluetoothRemoteVersionInfoReported is logged when we learn about
the manufactuer and Bluetooth version of remote Bluetooth controller
and stack
* BluetoothSdpAttributeReported is logged when we learn about services
provided by the remote device and their metdata such as protocol
version and feature bitmask. Only profiles that use 16-bit UUIDs are
logged
* BluetoothBondStateChanged is logged when Bluetooth bonding state is
changed a a macro level such as none -> bonding, bonding -> bonded,
and user interaction events such as passkey confirmation
* BluetoothClassicPairingEventReported is logged from native layer
when Bluetooth classic pairing state changed due to HCI command
or events. This is a more verbose level logging compared to
BluetoothBondStateChanged
* BluetoothSmpPairingEventReported is logged from native layer when
Bluetooth Security Manager Protocol based pairing state changed due to
SMP command sent or received. Pairing failure reason code is also
logged as a pre-defined enum
Bug: 112969790
Test: test drive with statsd
Change-Id: I94d1530758f79ce6d5f119426b1379c76517afec
* BluetoothA2dpPlaybackStateChanged:
- Logged when A2DP playback state changed for individual devices
* BluetoothA2dpCodecConfigChanged
- Logged when A2DP codec configuration changed for individual devices
* BluetoothA2dpCodecCapabilityChanged
- Logged when A2DP codec capability changed for individual devices
* BluetoothActiveDeviceChanged
- Logged when A2DP/HFP/HEARNING_AID active device changed
* BluetoothA2dpAudioOverrunReported
- Logs when A2DP failed send encoded data to the remote device fast
enough such that the transmit buffer queue is full and we have to
drop data
* BluetoothA2dpAudioUnderrunReported
- Logs when A2DP failed to read from PCM source
* BluetoothDeviceRssiReported
- Logged when remote device's RSSI level is reported by the controller
* BluetoothDeviceFailedContactCounterReported
- Logged when ACL transmit queue was flushed by the controller
- This is normally disabled unless we set automatic flush timeout was
set to a non-zero value
- However, when this event is reported, the connection quality must
be very bad
* BluetoothDeviceTxPowerLevelReported
- Logged when transmit power level is reported for a particular
connection
Bug: 112969790
Test: make, testdrive with statsd
Change-Id: I7deb85567630fae75be733df21b45f9c6bcf9e17
If a value metric has N values, not having a diff base will mean that N
calls of `onMatchedLogEventInternalLocked` are needed to output all values.
Bug: 123177418
Test: Unit tests `ValueMetricProducerTest#TestSkipZeroDiffOutput` amended
Test: Manual inspection of `cmd stats dump-report` shows all eight values
for CpuTimePerThreadFreq metrics
Change-Id: I8857c294ade049a4a42ef411d3d995610e04daf4
Framework will add logging in the next CL
Bug: 120161047
Bug: 117060268
Bug: 121072756
Bug: 121071984
Test: Builds
Change-Id: I673d8af8be78be11b5eac249c47847ebeca2cd2e
Creates a StatsManager API to register a pending intent that is invoked
whenever the active status of any of any config sent by that uid
changes.
ag/6112554 and further cls are needed to properly send back the pending
intent.
Bug: 123372077
Test: build success on blueline-eng. More thorough testing should be
done once ag/6112554 is submitted.
Change-Id: I36985c9820d4e7ac178064924190af88ea822254
This is going to be logged when a module is rolled back by watchdog for
causing any crash/problem.
Bug: 122808286
Test: not needed for now but will be tested when StatsLog.write is
triggered.
Change-Id: I1a7461b160206ab41e76621759e8dfb78ea0833b
These pullers return deterministic values so we'll be able to confirm
to validate the data easily server side locally.
For instance,
- the diff of the elapsed_clock_millis field should always be equal to the bucket size
- the diff of pull_count should always be one unless we hit the cache
Test: manual
Change-Id: I4fab30df287e90f8691740d90d87b67022b9c420