Commit Graph

5695 Commits

Author SHA1 Message Date
TreeHugger Robot
08fd0afd89 Merge "[statsd/tools] allow multiple connected devices" into rvc-dev am: 6f9b5cc365 am: 7f5ed283c2
Change-Id: I79af42932e75062680c49a95c1fc28991d2f0686
2020-04-03 18:40:32 +00:00
TreeHugger Robot
6f9b5cc365 Merge "[statsd/tools] allow multiple connected devices" into rvc-dev 2020-04-03 18:22:01 +00:00
Christine Tsai
b8000791ad Merge "Remove StateConditionTracker from statsd" into rvc-dev am: d4abb2f9ff am: dd506ab6ea
Change-Id: Idb5182156981a5784fc11e6732c01d5240efac0d
2020-04-03 18:21:13 +00:00
Christine Tsai
d4abb2f9ff Merge "Remove StateConditionTracker from statsd" into rvc-dev 2020-04-03 18:13:06 +00:00
tsaichristine
3d8e12a5ef Remove StateConditionTracker from statsd
StateConditionTracker was previously used as a way to slice by state
through a specific SimplePredicate definition. It is currently being
replaced by StateTracker, and no metrics use StateConditionTracker at
this time.

Bug: 136566566
Test: bit statsd_test:*
Change-Id: I1a14747907c23482a1b7500c6d7f07cd2f1d4aed
2020-04-03 09:41:52 -07:00
Siarhei Vishniakou
c6b32a6615 Merge "Updated documentation for CTS uhid tests" into rvc-dev am: 01c36833b9 am: f489424a53
Change-Id: Idf1b5eb23a80ee69a954cf55e6335d454a3ac161
2020-04-03 16:26:44 +00:00
Siarhei Vishniakou
01c36833b9 Merge "Updated documentation for CTS uhid tests" into rvc-dev 2020-04-03 15:58:33 +00:00
TreeHugger Robot
401ec5cca9 Merge "Turn on uid sandboxing" into rvc-dev am: a07da2913d am: df5e84b1ea
Change-Id: I29527e4fe47b8a9726ebeb473d7fb7cbc157ab11
2020-04-03 14:51:00 +00:00
Tej Singh
d8049352da Turn on uid sandboxing
Test: bit statsd_test:*
Test: atest GtsStatsdHostTestCases
Test: atest CtsStatsdHostTestCases
Bug: 152543345
Change-Id: Ie1fda2fefe0b03454fb91b2645f56431f04adcc1
2020-04-02 23:31:08 -07:00
Tej Singh
9de689a4af Merge "Link to death for pullers" into rvc-dev am: b23d417614
Change-Id: Ia4f2680aae38ec74a37eedeb0a5d2d884cb0df88
2020-04-03 01:28:03 +00:00
Tej Singh
b23d417614 Merge "Link to death for pullers" into rvc-dev 2020-04-03 01:04:57 +00:00
Christine Tsai
b5bfcffbb1 Merge "Slice by state in DurationMetricProducer" into rvc-dev am: 8ad7c0ec42
Change-Id: I7c77e56f533b42dbffb4a55138523d2340a19554
2020-04-03 00:48:35 +00:00
tsaichristine
1449fa4661 Slice by state in DurationMetricProducer
- Added #onStateChanged logic to DurationMetricProducer
- Only SUM aggregation type supports state slicing.
OringDurationTrackers now track durations keyed by different state
values.
- Added unit tests for DurationMetricProducer state changes

Test: bit statsd_test:*
Bug: 145838038
Bug: 136566566
Change-Id: I87dcc21bb904ef0fa76ea196d60dadae00f310fa
Merged-In: I735c7deee96639c32cad4b907e59b354dfd98d77
2020-04-02 14:53:40 -07:00
Ruchir Rastogi
4d27d3629a Merge "Store annotation info in LogEvent/FieldValue" into rvc-dev am: c0a892456b
Change-Id: I83ea7be93892f2c5f6a704c0beb63f2e8db66a6f
2020-04-02 16:05:49 +00:00
Ruchir Rastogi
c0a892456b Merge "Store annotation info in LogEvent/FieldValue" into rvc-dev 2020-04-02 15:49:22 +00:00
Muhammad Qureshi
2ae320ad8f Merge "Log annotations for pulled atoms." into rvc-dev am: c598ff319c
Change-Id: I312651917f35d985608e00355ea50b8a5a7db222
2020-04-02 14:00:54 +00:00
Muhammad Qureshi
c598ff319c Merge "Log annotations for pulled atoms." into rvc-dev 2020-04-02 13:59:18 +00:00
Tej Singh
dd25c825df Link to death for pullers
Set linkToDeath for IPullAtomCallbacks and remove them from the puller
map.

Bug: 146439412
Test: bit statsd_test:*
Test: manually killed system server and made sure all binder deaths were
received

Change-Id: Iba440156b9832d6514d8a9515124d29227dd4123
2020-04-01 16:33:50 -07:00
Farid Chahla
853f0d322a Updated documentation for CTS uhid tests
A new field was added where bus can be specified for testing uhid
devices. This commit adds the relevant documention to the README.

Bug: 144949707
Test: none

Change-Id: If5f6673dd0fdd268b702119b6ccd4abdc37f65bd
2020-04-01 20:50:55 +00:00
Jeffrey Huang
d6960d80f1 Merge changes Icd1b1e57,Ib9c6b9b4 into rvc-dev am: 898dda3919
Change-Id: Iedf25e62f53ef2d72d0a9f7eda9379e2bb5cc4a7
2020-04-01 19:02:48 +00:00
Jeffrey Huang
898dda3919 Merge changes Icd1b1e57,Ib9c6b9b4 into rvc-dev
* changes:
  Load Metadata from Disk
  Save metadata to Disk
2020-04-01 18:56:26 +00:00
Ruchir Rastogi
13296519fa Store annotation info in LogEvent/FieldValue
Test: bit statsd_test:*
Bug: 151109630
Change-Id: I9e07400baed51d5e0b507d9b11118bd29bf41708
2020-04-01 10:03:34 -07:00
Songchun Fan
44e7c134d4 [statsd/tools] allow multiple connected devices
// Multiple devices connected
Test: adb devices
List of devices attached
02211FQC200065	device
98141FFBA005QD	device
Test: out/host/linux-x86/bin/statsd_testdrive -s 98141FFBA005QD 261
Test: out/host/linux-x86/bin/statsd_localdrive -s 98141FFBA005QD get-data 261

// Single device connected
Test: adb devices
98141FFBA005QD	device
Test: out/host/linux-x86/bin/statsd_testdrive 261
Test: out/host/linux-x86/bin/statsd_localdrive get-data 261

BUG: 152913040
Change-Id: I54009b9151565ddb5512a4f7b3ff8ef67c3a2055
2020-04-01 09:27:52 -07:00
Muhammad Qureshi
22e52daa05 Log annotations for pulled atoms.
- Also add is_uid annotation to PackageNotication atoms.

Bug: 150414118
Test: m
Change-Id: I5e9abfe4772b04a66bc055e0d784469d94597748
2020-03-31 20:24:22 -07:00
Jeffrey Huang
475677e771 Load Metadata from Disk
Bug: 148280505
Test: bit statsd_test:*
Test: Manual - Added Config, Tested System Server Crash
Test: Manual - Added Config, Tested Device restart
Change-Id: Icd1b1e57bbf24e4a5676820a2b955f2034d4b37d
2020-03-31 19:10:58 -07:00
Jeffrey Huang
b8f5403d17 Save metadata to Disk
Bug: 148280505
Test: bit statsd_test:*
Change-Id: Ib9c6b9b4f22e7380717b480c7ae4a37bb3364619
2020-03-31 19:10:58 -07:00
Zhen Sun
9d4c65cd8e Merge "Add atom of TvSettings and its enum" into rvc-dev am: e31edc21a1
Change-Id: I133db962d0398e624d4c3b42342f61de20255c93
2020-03-31 23:39:59 +00:00
Zhen Sun
e31edc21a1 Merge "Add atom of TvSettings and its enum" into rvc-dev 2020-03-31 23:24:21 +00:00
TreeHugger Robot
e1ac4b0366 Merge "Log also the lang id model name that is involved in events" into rvc-dev am: 32f3bcfcd2
Change-Id: I70cf70f98711667cae04a9d9c487c997fd5e2d9b
2020-03-31 20:13:21 +00:00
TreeHugger Robot
32f3bcfcd2 Merge "Log also the lang id model name that is involved in events" into rvc-dev 2020-03-31 20:04:47 +00:00
TreeHugger Robot
30b9a38675 Merge "Guardrail for pull cooldown/timeout" into rvc-dev am: 533a99f3b0
Change-Id: Icd87036716c07c222193e61e068e90c5043774e3
2020-03-31 18:47:42 +00:00
TreeHugger Robot
533a99f3b0 Merge "Guardrail for pull cooldown/timeout" into rvc-dev 2020-03-31 18:25:56 +00:00
Tony Mak
2c0049521b Log also the lang id model name that is involved in events
Possible values:
und_v0, und_v1

What is it:
The model version of the LangId model file.

Who determines this value?
The textclassifier team. The model version is burnt to the model file.

Test: m
Test: atest TextClassifierServiceTest

Bug: 152490822

Change-Id: I0058536ee4e5d8e9c14e100b61683c67af28981d
2020-03-31 17:12:17 +00:00
Tej Singh
abc1b8de87 Guardrail for pull cooldown/timeout
Enforce a 1 second minimum cooldown and a 10 second maximum timeout on
pullers.

Test: bit statsd_test:*
Test: atest LibStatsPullTests
Test: atest GtsStatsdHostTestCases
Bug: 152543610
Change-Id: Ida0047235a7e56d7b700f1a7ab5cfbc2a147caeb
2020-03-30 22:26:46 -07:00
Mike Ma
69a4e6f1bf Merge "Fix a race condition on ReportHandler::mBatch" into rvc-dev am: 66639a4f54
Change-Id: If4b1c3be6bdbcc786dd31971aefe80f18d850474
2020-03-31 01:15:54 +00:00
Zhen Sun
0bec8d43a1 Add atom of TvSettings and its enum
The enums correspond to pages and entries of TvSettings. Some enums that
are related to unreleased features are not included in this CL but will
be added when this CL is cherrypicked into upstream non-public
TV-specific branches.

The atom definition is reviewed and approved by Metrics council.

Metrics council review bug: 151768952
Bug: 150979527
Test: the Android tree still builds normally

Change-Id: I4258312c19aa4f2f0cd178bc5b5dc53e52c6c737
Merged-In: I4258312c19aa4f2f0cd178bc5b5dc53e52c6c737
2020-03-30 23:39:19 +00:00
Mike Ma
b98050fc04 Fix a race condition on ReportHandler::mBatch
Hold mLock when accessing mBatch and mHandlerLooper in ReportHandler.

Fixes: 147326028
Test: Take an incident report. Verify no race condition.
Change-Id: I9d6da0067731f253532f60e5abb12dfb238b5411
2020-03-30 14:44:42 -07:00
Ryan Mitchell
bb99b2afce Merge "Consider target path when verifyIdmap." into rvc-dev am: fa0f02a91c
Change-Id: Iad2e29a73f4b7b11c84fa30fd376a5d25e3c197c
2020-03-30 15:49:11 +00:00
Ryan Mitchell
fa0f02a91c Merge "Consider target path when verifyIdmap." into rvc-dev 2020-03-30 15:45:47 +00:00
Dichen Zhang
9b3486b023 Merge "Fix command injection on screencap" into rvc-dev am: f24f832fd7
Change-Id: I2c7bc585117f7335d21acc151befe212fb6259b3
2020-03-28 06:49:07 +00:00
Dichen Zhang
f24f832fd7 Merge "Fix command injection on screencap" into rvc-dev 2020-03-28 06:34:31 +00:00
TreeHugger Robot
bbf4db7cce Merge changes from topic "tej-uid" into rvc-dev am: 0ac1c345a4
Change-Id: Ia9d60b28c0a4f07059069811e81bc547b824b592
2020-03-28 04:38:48 +00:00
Tej Singh
f4e17e6639 LibstatsPullTest, Testdrive updates for sandboxing
Test: atest LibStatsPullTests
Test: statsd_testdrive 10051 10004 10055
Test: adb shell cmd stats pull-source 10051 AID_STATSD
Test: adb shell cmd stats pull-source 10055 AID_GPU_SERVICE
Test: adb shell cmd stats pull-source 10004
Bug: 151642352
Change-Id: I3b104cb2f2427b4558d5175dfeb3bb2c80012d0e
2020-03-27 19:02:10 -07:00
Chen Chen
c6cf6a8eb7 Merge "Bluetooth Metrics: Add metric_id field for Bluetooth metrics to proto. The incremental id is neither a device id nor a pseudo name and therefore PII free." into rvc-dev am: 0941d63aee
Change-Id: I22f7d098de494503fca06d90e12de1ef33661183
2020-03-28 01:08:08 +00:00
Tej Singh
3be093b518 Uid Sandboxing of Pullers
Overall flow of implementation:
1. parsing the config in MetricsManager to store the uids per atom. It
follows the mAllowedLogSources logic very closely
2. MetricsManager register itself as a PullUidProvider with the
PullerManager.
3. Metrics pass the config key when pulling (for both registering
receivers and normal pulls) , and the puller manager gets
the allowed uids from the PullUidProvider for that config.
4. PullerManager keys receivers by <atomId, configKey> so that it can
look up the uids for that atom using the PullUidProvider as well.
5. Added shell subscriber support. Hardcode a default of AID_SYSTEM for
them and also allow packages per atom. This involved adding a second
interface to Pull that simply accepts the uids, since I didnt want to
make the ShellSubscriber a PullUidProvider as well.
6. Change adb shell cmd stats pull-source to allow users to specify a
package. Default to AID_SYSTEM as well.

Notes:
The feature is flagged off right now, since configs do not pass in the
desired package. Another approach could be to hardcode in the current
mapping, but that doesn't work for OEM pulled atoms.

Test: m statsd
Test: bit statsd_test:* with useUids = false
Test: bit statsd_test:* with useUids = true
Bug: 144099783
Bug: 151978258

Change-Id: I4a7481d7402a52b9beb4ea28b102803f9e50e79f
2020-03-27 18:07:24 -07:00
Chen Chen
0941d63aee Merge "Bluetooth Metrics: Add metric_id field for Bluetooth metrics to proto. The incremental id is neither a device id nor a pseudo name and therefore PII free." into rvc-dev 2020-03-28 00:54:26 +00:00
TreeHugger Robot
eb1f442779 Merge "Fix atom id annotation parsing" into rvc-dev am: 4efa78539d
Change-Id: I9b575ef4648b7bfc3c18d418e1f21da7efad1a8b
2020-03-27 22:26:59 +00:00
TreeHugger Robot
4efa78539d Merge "Fix atom id annotation parsing" into rvc-dev 2020-03-27 22:02:38 +00:00
Muhammad Qureshi
f2012da846 Fix atom id annotation parsing
Bug: 152633444
Test: m -j cts && m -j CtsStatsdHostTestCases && cts-tradefed run
cts-dev -m CtsStatsdHostTestCases -t
android.cts.statsd.atom.UidAtomTests#testAudioState
Test: bit statsd_test:*

Change-Id: I167012330e431b38b86f190ca6b5d4f90995172f
2020-03-27 12:38:00 -07:00
hg.choi
a3a68132b5 Consider target path when verifyIdmap.
Updating new version package with changing resource id,
Overlay idmap still retain same resource id and target path of prebuilt package.
Consequentially overlay can not apply to new update resource id.

As is : VerifyIdmap only verify uptodate of idmap.
To be : Verify change of target path.

Bug: 147794117
Bug: 150877400
Test: idmap2_tests

Change-Id: I2ed6b5ba49aeb1b24625866daefea56c9766baef
2020-03-26 12:35:58 -07:00