Commit Graph

1200 Commits

Author SHA1 Message Date
TreeHugger Robot
5107527a03 Merge "Fix KeyValuePairsAtom" 2019-02-05 07:22:39 +00:00
Tej Singh
2c96b5acf3 Fix KeyValuePairsAtom
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
2019-02-04 21:28:49 -08:00
Maggie White
080619f1da Merge "atoms: Fix HardwareErrorCode to match Stats HAL definition" 2019-02-05 00:57:03 +00:00
Maggie White
6dcd8578cb atoms: Fix HardwareErrorCode to match Stats HAL definition
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>
2019-02-01 20:34:42 -08:00
TreeHugger Robot
5a717cd23e Merge "Atom: Add BluetoothSocketConnectionStateChanged" 2019-02-02 02:14:55 +00:00
Jack He
815cdbaae0 Atom: Add BluetoothSocketConnectionStateChanged
* 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
2019-02-01 16:18:24 -08:00
TreeHugger Robot
930634c3b0 Merge "Pull dangerous permission state as atom" 2019-02-01 23:58:34 +00:00
Philip P. Moltmann
f21a350d23 Pull dangerous permission state as atom
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
2019-02-01 10:59:24 -08:00
Philip P. Moltmann
e0cf4e6087 Add PermissionGrantRequestResultReported atom
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
2019-02-01 10:22:37 -08:00
TreeHugger Robot
472c6e8124 Merge "Fix failing statsd unit tests" 2019-02-01 01:48:31 +00:00
Tej Singh
d7b5118f23 Fix failing statsd unit tests
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
2019-01-31 16:03:50 -08:00
Hui Yu
4f05880351 Merge "Add statsd atom PROCESS_START_TIME" 2019-01-31 23:54:04 +00:00
Hui Yu
885aca1bba Add statsd atom PROCESS_START_TIME
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
2019-01-31 13:15:48 -08:00
Steven Wu
a254dabcc8 Add logging for bubble UI events.
Bug: 123543171
Test: manual on local device using statsd_testdrive
Change-Id: I4d344d94e39f52fdd743b99390616c23c86a3a45
2019-01-31 14:32:47 -05:00
Alex Salo
4d35df367b Merge "Add screen timeout extension event to statsd" 2019-01-31 02:27:42 +00:00
Philip P. Moltmann
4ef7a11a67 Merge "Pull all current role holders into statsd" 2019-01-30 22:20:24 +00:00
Misha Wagner
5222946e1e Merge "Add more statistics on failure cases for value metrics" 2019-01-30 11:31:39 +00:00
Philip P. Moltmann
70b42ae8ee Pull all current role holders into statsd
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
2019-01-29 21:04:49 -08:00
Alex Salo
d7c3eefece Add screen timeout extension event to statsd
Bug: 122960476
Test: tested locally on device using statsd_testdrive

Change-Id: I04342bc70ff4ef11c20836da52d9bfc5a6661aa2
2019-01-30 02:38:52 +00:00
Kevin Chyn
db77e13a45 Add require_confirmation to BiometricAuthenticated atom
Bug: 120161047
Bug: 117060268
Bug: 121072756
Bug: 121071984

Test: Builds
Change-Id: Id67a0063db75b77454e6ecbb5b85d65267351c67
2019-01-29 13:30:41 -08:00
Misha Wagner
1eee22107f Add more statistics on failure cases for value metrics
This adds to PulledAtomStats and creates a new stats atom AtomMetricStats.

Test: none
Bug: 123572169
Change-Id: Ifea682005210a6342a027643e162f8ce7785cb06
2019-01-29 16:44:30 +00:00
Misha Wagner
c066c93da8 Merge "Fix issue in ValueMetricProducer where values are not reported" 2019-01-29 09:36:17 +00:00
Jack He
1021a61081 Atom: Add more Bluetooth atoms
* 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
2019-01-28 13:56:33 -08:00
Jack He
c27040aea7 Atom: Add A2DP playback related atoms to StatsLog
* 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
2019-01-28 13:55:54 -08:00
Kweku Adams
8845d01b72 Add logging to statsd for job constraint changes.
Bug: 117846754
Bug: 111423978
Bug: 120941744
Test: `make statsd_testdrive &&
./out/host/linux-x86/bin/statsd_testdrive 150` and check output

Change-Id: Iadfdb07171b8d4f99b8f57008cc7c1fc2865bb8e
2019-01-28 10:39:16 -08:00
Olivier Gaillard
908e048d73 Merge "Add gaillard@ to owners." am: 1e02188bfe am: 78d79c5d5f
am: d4aa9d051d

Change-Id: I2bf7c9529616dd1d703b5c8b97957f4affb2901f
2019-01-28 08:45:02 -08:00
Olivier Gaillard
d4aa9d051d Merge "Add gaillard@ to owners." am: 1e02188bfe
am: 78d79c5d5f

Change-Id: I3ae2a1953d9a6e22aa972552f7afc7abfb8d11d1
2019-01-28 08:30:48 -08:00
Treehugger Robot
1e02188bfe Merge "Add gaillard@ to owners." 2019-01-28 15:37:24 +00:00
Misha Wagner
26531761e2 Fix issue in ValueMetricProducer where values are not reported
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
2019-01-28 14:55:21 +00:00
TreeHugger Robot
367f068696 Merge "Change latency to int64" 2019-01-28 04:05:33 +00:00
Steven Wu
acef6bb4a7 Add a westworld atom for SystemUI bubbles logging.
Bug: 111236845
Test: manual
Change-Id: I94736afabd210ac32d430f17a8c5d71f4ada9b87
2019-01-27 16:06:43 -05:00
Kevin Chyn
1d19c69ac7 Change latency to int64
Bug: 120161047
Bug: 117060268
Bug: 121072756
Bug: 121071984

Test: Builds
Change-Id: I67a23128a35b76302dbde04b6838420b8731da61
2019-01-27 12:47:29 -08:00
Kevin Chyn
1741a07f4e Update Biometric Atoms
Framework will add logging in the next CL

Bug: 120161047
Bug: 117060268
Bug: 121072756
Bug: 121071984

Test: Builds

Change-Id: I673d8af8be78be11b5eac249c47847ebeca2cd2e
2019-01-26 21:53:00 -08:00
Tej Singh
bd37b5f8b3 Merge "APIs for registering config activation broadcasts" 2019-01-27 02:32:37 +00:00
Howard Ro
34521ced96 Merge "Add WatchdogRollbackOccurred atom" 2019-01-27 02:00:30 +00:00
TreeHugger Robot
3cf44ca734 Merge "Amend flagFlipUpdateOccurred atom" 2019-01-27 00:12:28 +00:00
Tej Singh
2c9ef2a92e APIs for registering config activation broadcasts
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
2019-01-25 17:58:02 -08:00
Howard Ro
e103fe2ec9 Add WatchdogRollbackOccurred atom
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
2019-01-25 16:44:29 -08:00
Olivier Gaillard
18d4522058 Add pullers for debugging.
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
2019-01-25 18:30:01 +00:00
Chenjie Yu
eeb75cd2bb Merge "rework BinaryPushStateChanged atom" 2019-01-25 04:07:07 +00:00
Chenjie Yu
8366c71ce8 rework BinaryPushStateChanged atom
Bug: 119685453
Test: will add gts
Change-Id: I60e83b2e0fcf63bab1ec695db90ed9f7a2846571
2019-01-24 15:26:15 -08:00
Jack Yu
808d5e1879 Merge "Define Nfc statistic data atoms" am: 961a43eae2
am: 20548152f7

Change-Id: Ie72691a9bbdc505497c4cc99a1feadcc088a1baa
2019-01-24 13:07:37 -08:00
Treehugger Robot
961a43eae2 Merge "Define Nfc statistic data atoms" 2019-01-24 20:25:57 +00:00
Badhri Jagan Sridharan
a3a3012d16 Merge "Log USB contaminant status" 2019-01-24 15:21:49 +00:00
Olivier Gaillard
661d053916 Add gaillard@ to owners.
Test: n/a
Change-Id: I6f04ee34319c780cd9d7e6c842c3a3e9c29d0b0c
2019-01-24 11:36:13 +00:00
Jack Yu
6d421bc5e5 Define Nfc statistic data atoms
Test: Manual
Bug:116641110

Change-Id: Ia7e56c159d64804049abf39717e3eeae43373a76
Merged-In: Ib521a9f2d4d098022d973fe6c775231a518f3f49
2019-01-24 15:16:20 +08:00
Chiachang Wang
a04bc57c2a Merge "Add NetworkStack to allowed log sources in statsd_testdrive" 2019-01-24 07:12:07 +00:00
TreeHugger Robot
dab8059a29 Merge "statsd implementation of vendor atom" 2019-01-24 07:00:08 +00:00
Tej Singh
e765dc6e5f Merge "Statsd uses ThermalService to pull temperatures" 2019-01-24 06:10:13 +00:00
Chiachang Wang
770a41298d Merge "Add NetworkStack into AidToUidMapping" am: a3dd0a5050 am: b64b24d127
am: cc272be339

Change-Id: I7ad88b03e5c41cb8096316699158b4c7ae2c587e
2019-01-23 21:08:31 -08:00