1152 Commits

Author SHA1 Message Date
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
Chiachang Wang
cc272be339 Merge "Add NetworkStack into AidToUidMapping" am: a3dd0a5050
am: b64b24d127

Change-Id: I7275fb5693463680ff9e07ad15e81e90214c196b
2019-01-23 20:55:03 -08:00
Maggie White
58174daebd statsd implementation of vendor atom
Bug: 122541417
Test: su 0 ./stats_client -v
Change-Id: I2508f6206b36ffe94c87308ab63ae1577b4b67d0
Signed-off-by: Maggie White <maggiewhite@google.com>
2019-01-23 17:46:29 -08:00
Carter Hsu
b8fd1e90f5 statsd: implement Speech DSP stat report
Bug: 122719904
Test: manual stats_client test and check the statsd logs
Change-Id: I3dac9f31f59e6f10393c97c6bd9ca0d0ccb11e23
Signed-off-by: Carter Hsu <carterhsu@google.com>
2019-01-24 09:12:38 +08:00
Michael Groover
d15f8b9ad5 Merge "Revoke 'always allow' adb grants after period of inactivity" 2019-01-23 16:47:48 +00:00
Chiachang Wang
d09275059c Add NetworkStack to allowed log sources in statsd_testdrive
Test: - atest statsd_test
      - manual test with statsd_testdrive
Bug: 123260425
Change-Id: Id23162efbdee6979cfa1da5862ff874eed825926
2019-01-23 15:48:34 +08:00
Jack Yu
4bb90eb246 Define Nfc statistic data atoms
Fix format of variable "packageName".

Test: Manual
Bug:116641110
Change-Id: I4f280e3f2540cf0fdce7c9c89393ce246e0825b2
2019-01-23 15:13:41 +08:00
Chiachang Wang
69e41313cc Add NetworkStack into AidToUidMapping
Package name of NetworkStack may be different or be updated
further. Use AID_NETWORK_STACK in statsd for better
maintenance.

Bug: 123260425
Test: atest statsd_test
Change-Id: I18d58f03642b4a4465c23197162d239206cb1df4
2019-01-23 15:07:36 +08:00
Michael Groover
9e7b06efe3 Revoke 'always allow' adb grants after period of inactivity
Bug: 111656592
Change-Id: I679078dc3e8f61f33ca0922a47777eedb6a933de
Fixes: 116512306
Test: atest AdbDebuggingManagerTest
2019-01-22 20:46:20 -08:00
Alex Salo
a060aee498 Add AttentionManagerService result logging into WW
Bug: 122960476
Test: tested locally on device using statsd_testdrive
Change-Id: I3f77e7c55cd6999d135896b5101fefb60560424a
2019-01-22 18:08:34 -08:00
TreeHugger Robot
810d940769 Merge "Log broadcast dispatch latency during BOOT_COMPLETED" 2019-01-22 19:51:41 +00:00
TreeHugger Robot
aa7fab9483 Merge "statsd: Add BatteryCycleCount atom" 2019-01-22 17:56:55 +00:00
Ng Zhi An
7ff7fdb76f Log broadcast dispatch latency during BOOT_COMPLETED
From device boot until BOOT_COMPLETED, log the dispatch latency of a
broadcast, which is the duration between it being enqueued and it being
dispatched, to get an idea of how long the queue is blocked for.

Each time a broadcast is dispatched, we check mLogLatencyMetrics, which
defaults to true when the queue is initialized, and log to statsd.

When the queue is empty, we check if BOOT_COMPLETED is done. If it is,
we stop logging by setting mLogLatencyMetrics to false, since it means
that we have finished all broadcasts that
would have been blocked by BOOT_COMPLETED.

Bug: 120794810
Test: flash, reboot, use stasd_testdrive to verify logging
Change-Id: I40c14744e5247412c0a03032fd5621706758a324
2019-01-22 08:48:33 -08:00
Jack Yu
95b64f3f4e Define Nfc statistic data atoms
Test: Manual
Bug:116641110

Change-Id: Ib521a9f2d4d098022d973fe6c775231a518f3f49
2019-01-22 18:04:33 +08:00
Maggie White
3dc172438a Merge "statsd implementation of USB port overheat event reporting" 2019-01-22 07:58:44 +00:00
Siarhei Vishniakou
3ddecff56f Touch event latency metrics
Add a basic metric about touch event latency.

Metric design doc:
https://docs.google.com/document/d/1funj0dM9oZMiivhz43U5WM2wA2zWiPWsOxO-Jl5PmbY/edit#

Bug: 111431676
Bug: 122748138
Test: manual test following procedures in the doc
Change-Id: Ifc2643b53c2211f67355b27c2ab4e706c00eae97
2019-01-21 20:56:16 -08:00
Maggie White
8735b85958 statsd: Add BatteryCycleCount atom
The health HAL specifies a charge cycles path that currently has no
atoms allocated to it. This change will allow statsd to collect this
information. I also ran 'clang-format -i --style=file' on this file.

Bug: 120680509
Test: cts-tradefed run singleCommand cts-dev -m CtsStatsdHostTestCases \
      -t android.cts.statsd.atom.HostAtomTests#testBatteryCycleCount
Test: adb shell cmd stats pull-source 10045
Change-Id: I796b275c5d6880e9d7ec5bc468b55d7dc421ac78
Signed-off-by: Maggie White <maggiewhite@google.com>
2019-01-18 17:24:15 -08:00
Maggie White
fc1aa59dff statsd implementation of USB port overheat event reporting
Bug: 119200347
Test: su 0 ./stats_client -u
Test: Observed USB port overheat event in statsd logs
Change-Id: Ic8801417c54c118e10bb9b631d8e77d68a65c799
Signed-off-by: Maggie White <maggiewhite@google.com>
2019-01-18 16:00:48 -08:00
TreeHugger Robot
837f453cfb Merge "Add GnssNfwNotificationReported and GnssConfigurationReported" 2019-01-18 22:09:29 +00:00
TreeHugger Robot
73dd7c9104 Merge "allow disable partial bucket on app upgrade" 2019-01-18 19:26:40 +00:00
Chenjie Yu
cd1b797c8c allow disable partial bucket on app upgrade
Bug: 112630210
Test: unit test
Change-Id: I2de38d35f14b813d2837455a322acc2e00813e3b
2019-01-18 09:38:39 -08:00
Yu-Han Yang
14d5fb45d4 Add GnssNfwNotificationReported and GnssConfigurationReported
Bug: 122091220
Test: on device using statsd_testdrive
Change-Id: I888ce76ce585589e27dae9bace9da842eb21437f
2019-01-18 08:52:34 -08:00
Felix Lopez Luis
25b35daba8 Merge "Add new atoms to log Downgraded Apps and Low Storage" 2019-01-18 10:30:04 +00:00
Jack He
50b90a031d Merge "Atom: Update BluetoothConnectionStateChanged atom" am: 1ff7bdb095
am: 93c60d8e14

Change-Id: I042bde724451436ef0fa81e60e42b19a68ff138e
2019-01-17 15:36:47 -08:00
Jack He
610a8bffc0 Merge "Atom: Add BluetoothLinkLayerConnectionEvent atom" am: 9a6046bb3b
am: 6bb6b5b280

Change-Id: I3de2055961c34e661a28ad1d578980e088087c95
2019-01-17 15:21:25 -08:00
Chenjie Yu
b2ecc793af add page fragmentation info into procstats
Bug: 123021121
Test: atest
CtsStatsdHostTestCases:android.cts.statsd.validation.ProcStatsValidationTests#testProcStatsPkgProcStats
Change-Id: Icd60aa6fb3e2787fd0f628edeeab0d5872d2c497
2019-01-17 14:49:19 -08:00
Felix Lopez Luis
d95346a3c6 Add new atoms to log Downgraded Apps and Low Storage
Change-Id: I211696c836cb9c8a7b72e3693ecba3061ca599bf
Bug-Id: b/120911106
Test: refactoring CL. Existing unit tests still pass.
2019-01-17 14:52:02 +00:00
Jack He
22e4a1da50 Atom: Update BluetoothConnectionStateChanged atom
* Use salted hashed Bluetooth device identifier and deprecate old
  ofuscted_id
* Add BluetoothAclConnectionStateChanged and BluetoothScoConnectionStateChanged
  to track ACL and SCO connections

Bug: 112969790
Test: Bluetooth unit test, test drive with statsd
Change-Id: I5398e4caae751e1fe1d6a95fa3bc56d062eb6172
Merged-In: I5398e4caae751e1fe1d6a95fa3bc56d062eb6172
(cherry picked from commit d9837c8a9e9c91d9907ea10e67bf6c6581ba1b4b)
2019-01-16 16:11:45 -08:00
Jack He
522601435d Atom: Add BluetoothLinkLayerConnectionEvent atom
* Add this atom to report events related to Bluetooth link layer
  connection, including:
  - Obfuscated ID of remote device
  - Connection handle
  - Direction of the connection
  - Type of the connection
  - Associated HCI command and/or event
  - Status code associated with HCI command and/or event
  - Reason code associated with HCI command and/or event
* Add enum definitions for HCI commands and events as defined in the
  Bluetooth 5.0 specification
* Add enum definitions for link type and direction

Bug: 112969790
Test: make, test drive with statsd
Change-Id: I0fdc59274d49ad503e9ba9cf8f49c9d8872a4131
Merged-In: I0fdc59274d49ad503e9ba9cf8f49c9d8872a4131
(cherry picked from commit ab86dbd20cf17a1389d42135865eabfc4fc48604)
2019-01-16 11:51:20 -08:00
Jack He
d9837c8a9e Atom: Update BluetoothConnectionStateChanged atom
* Use salted hashed Bluetooth device identifier and deprecate old
  ofuscted_id
* Add BluetoothAclConnectionStateChanged and BluetoothScoConnectionStateChanged
  to track ACL and SCO connections

Bug: 112969790
Test: Bluetooth unit test, test drive with statsd
Change-Id: I5398e4caae751e1fe1d6a95fa3bc56d062eb6172
2019-01-16 01:09:12 -08:00
Chiachang Wang
6936b95677 merge conflicts of c564b6e118905cd6e5000215ddcd58266c57890a to pi-dev-plus-aosp
Test: Fix conflict as instruction
Bug: None
Change-Id: Iebce2651c795abd223c2df1ae5ddf168351d70ad
Merged-In: I96f74d938663d579e4fea1eee6a4a250d7e21b3a
2019-01-16 13:28:35 +08:00
Jack He
ab86dbd20c Atom: Add BluetoothLinkLayerConnectionEvent atom
* Add this atom to report events related to Bluetooth link layer
  connection, including:
  - Obfuscated ID of remote device
  - Connection handle
  - Direction of the connection
  - Type of the connection
  - Associated HCI command and/or event
  - Status code associated with HCI command and/or event
  - Reason code associated with HCI command and/or event
* Add enum definitions for HCI commands and events as defined in the
  Bluetooth 5.0 specification
* Add enum definitions for link type and direction

Bug: 112969790
Test: make, test drive with statsd
Change-Id: I0fdc59274d49ad503e9ba9cf8f49c9d8872a4131
2019-01-15 20:07:32 -08:00
Chiachang Wang
bcfa1bfe3d resolve merge conflicts of c564b6e118905cd6e5000215ddcd58266c57890a to pi-dev-plus-aosp
Test: Fix conflict as instruction
Bug: None
Change-Id: I315b2c0ab50d033588dce75e6976f5ccbb5bed29
Merged-In: I96f74d938663d579e4fea1eee6a4a250d7e21b3a
2019-01-16 11:14:27 +08:00
Yu-Han Yang
8a1b51dcc5 Add GnssNiEvent logging
Bug: 122091220
Test: tested locally on device using statsd_testdrive

Change-Id: I45ab9a7b12e6e674f31bc2398d74fa827d6f8f61
2019-01-15 10:38:59 -08:00
TreeHugger Robot
3a13a85fd4 Merge "Log the fact that we don't have a prod key." 2019-01-15 17:42:10 +00:00
Mathew Inwood
610d096754 Log the fact that we don't have a prod key.
Hopefully this will never happen, but better to know if it does.

Test: atest SignedConfigHostTest
Bug: 122579497
Change-Id: I4ecdf94f7963728aecf17a448c7bfbc7dbd5f39e
2019-01-15 11:54:18 +00:00
Lalit Maganti
71d560440d Merge "statsd: add subscription id to Perfetto command line and fix printf bug" 2019-01-15 10:48:42 +00:00
lifr
76e0bba86b resolve merge conflicts of 2b208601c2a454220e0d49be4ac607f45079a7a2 to pi-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: I57b03766b585bb38e657e772dc4d6c3ad69a5237
Merged-in: I4588cec0dea8a4c5a19847a32a6d53bfc5953be7
2019-01-15 17:53:02 +08:00
Mathew Inwood
b375be5545 Add westworld logging to signed config.
This will allow verification of how well the feature works in prod, as
well as tracking real time usage once Q is released.

Test: atest CtsSignedConfigHostTests
Test: ./out/host/linux-x86/bin/statsd_testdrive 123

Bug: 110509075
Bug: 122350327
Change-Id: Ibada9490e18cbeee74e18aaa93ba9d0d7d03845e
2019-01-15 08:37:05 +00:00
Chiachang Wang
67f2447feb Add data_stall_event.proto to atoms.proto
Test: Build pass
Bug: 120452078
Bug: 121185319
Change-Id: I5a428fb60d4c1eb4fe397426606e937f27eacbc3
Merged-In: I96f74d938663d579e4fea1eee6a4a250d7e21b3a
2019-01-15 15:14:00 +08:00
lifr
35a7cf0192 Define DNS statistic data atom in atoms.proto file
Test: run runtests.sh, make sure no missing test and get all pass
      run /out/host/linux-x86/bin/statsd_testdrive
      116
      Got following metric data dump:pass for local test
Bug: 119862317

Change-Id: I83ee8500fac7f443711ced097cbd376feb801ccf
Merged-in: I4588cec0dea8a4c5a19847a32a6d53bfc5953be7
2019-01-15 12:44:33 +08:00
Frank Li
423b715d48 Merge "correct enum_default_value_name on atoms.proto" 2019-01-15 03:18:58 +00:00
lifr
357b7cfc2d correct enum_default_value_name on atoms.proto
Test: run runtests.sh, make sure no missing test and get all pass
      run /out/host/linux-x86/bin/statsd_testdrive 103
      Got following metric data dump:pass for local test
Bug: 119862317

Change-Id: I4588cec0dea8a4c5a19847a32a6d53bfc5953be7
2019-01-15 02:05:45 +08:00
Lalit Maganti
e5755008ec statsd: add subscription id to Perfetto command line and fix printf bug
This CL adds the id of the subscription triggering Perfetto to the
command line invocation of Perfetto. This is useful to allow for
distinguishing between experiments in post-processing (since the same
alert can be attached to multiple subscriptions).

This also fixes a bug in the same place where the last character of ids
could be cut off if any of the ids are large negative numbers i.e. the
smallest possible int64 is 20 chars long (including the minus sign).
However there were only 19 available digits in the string buffers which
these ids were printed into (the 20th would be the null terminator).
Increase the buffer size by 5 characters to allow for some headroom just
incase we need some in the future.

Bug: 122822046
Change-Id: I9c3ac8cb8b203fd464eee2c72b1228f1a50448b1
2019-01-14 18:01:18 +00:00
Frank Li
2792f56b90 Merge "Correct the atoms.proto name" 2019-01-14 17:34:33 +00:00
Christian Brunschen
f86039e16e Adds Westworld logging of RescueParty reset events.
Adds the RescuePartyResetReported Atom, and uses it in RescueParty.java
to log when a reset is done.
Also adds a small test program that can be built and run manually in
order to test the flow of new log events.

Test: Ran the test program and verified that the events flow through a
local statsd.

Change-Id: I0202dd8c00441d0544aed7de1d6027160b4d9a2b
Bug: 121121998
2019-01-14 11:29:11 +00:00
Chiachang Wang
6ec5ba9a6c Merge "Add data_stall_event.proto to atom.proto" 2019-01-14 07:56:15 +00:00