Commit Graph

3129 Commits

Author SHA1 Message Date
Chenjie Yu
cb2053dd30 Merge "Drop value if the bucket is totally tainted" into pi-dev am: 5bc03014c0
am: 0e93fd3da5

Change-Id: I4e695864e492613400c9c5c0559349d2278e70ef
2018-04-10 18:13:28 -07:00
Chenjie Yu
0e93fd3da5 Merge "Drop value if the bucket is totally tainted" into pi-dev
am: 5bc03014c0

Change-Id: I92b47ad538eeec38fbf4b4d7211dc75ebf903880
2018-04-10 18:01:53 -07:00
Chenjie Yu
ae63b0af94 Drop value if the bucket is totally tainted
Bug: 77870358
Change-Id: Ia96970a3254de08f94b91ad53be2fdb9f4db7eb4
Fix: 77870358
Test: unit test
2018-04-10 14:59:31 -07:00
Tej Singh
4f893f45e9 Merge "Add proto output of statsd stats in adb" into pi-dev am: c63fdfe02c
am: 33efdf91a9

Change-Id: I01a9965912c454b272ad1b28cd63eb80069857af
2018-04-06 14:20:54 -07:00
Tej Singh
33efdf91a9 Merge "Add proto output of statsd stats in adb" into pi-dev
am: c63fdfe02c

Change-Id: Ic48a98b037b070799adf73a45f4dcf6959af6cb3
2018-04-06 14:06:46 -07:00
Tej Singh
c63fdfe02c Merge "Add proto output of statsd stats in adb" into pi-dev 2018-04-06 20:42:22 +00:00
Yangster-mac
8edb8c86c1 Merge "Flush the partial bucket when startd shuts down or config updated." into pi-dev am: 9d4c397781
am: 585fc9d7e5

Change-Id: I133e83e9ad37790f0602c03110e23f6f000f0822
2018-04-05 20:23:12 -07:00
Yangster-mac
585fc9d7e5 Merge "Flush the partial bucket when startd shuts down or config updated." into pi-dev
am: 9d4c397781

Change-Id: I47587b68036a563553f1de2c9f37e1255fb6d770
2018-04-05 19:59:35 -07:00
Yangster-mac
e68f3a5811 Flush the partial bucket when startd shuts down or config updated.
Test: statsd test

BUG: b/77556036
Change-Id: Ie4a04ace55e07c4529cdff5906ba874f8815f620
2018-04-05 18:05:57 -07:00
David Chen
6209683cf3 Merge "Fix uid map to be simpler and fix partial bucket." into pi-dev am: 203bbbf942
am: 8420ea9bcc

Change-Id: Iedf6be09a1ce4e2a4627d8165a30827734b0bd91
2018-04-05 17:18:48 -07:00
David Chen
8420ea9bcc Merge "Fix uid map to be simpler and fix partial bucket." into pi-dev
am: 203bbbf942

Change-Id: Id9073af7625257072d6383aa174e9e5f21dc6216
2018-04-05 17:00:49 -07:00
David Chen
203bbbf942 Merge "Fix uid map to be simpler and fix partial bucket." into pi-dev 2018-04-05 23:43:45 +00:00
David Chen
bd12527c90 Fix uid map to be simpler and fix partial bucket.
The previous scheme captured periodic snapshots for each config with
complex logic that's unnecessary and wasted memory. We actually don't
need to store any snapshots since we just convert the current state
into a snapshot and also include the deltas (change events) since the
previous report until now.

To make the system more robust, we also include up to 100 of the
deleted apps in the uid map.

Also, fix the wiring of the partial buckets so the metric producers
form partial buckets on both app upgrade and removal, but not on
installation of a new app.

Also, we update StatsCompanionService to also include disabled apps.

Bug: 77607583
Test: Verified unit-tests pass and added new e2e tests.
Change-Id: I98e1f544d6e6571545ae1581c4cebab807596f51
2018-04-05 16:15:01 -07:00
Tej Singh
41b3f9a8cf Add proto output of statsd stats in adb
Test: statsd unit tests
Test: visually verified output of adb shell cmd stats print-stats was
sane
Test: making a CTS test that uses proto output
Bug: b/77548658

Change-Id: Ie60d66b9883f109446745dfcef97b7fb6194a1ac
2018-04-05 14:09:05 -07:00
Yi Jin
d01a55dcf1 Merge "This cl tries to fix cts tests IncidentdTest" into pi-dev am: 72a39eb3be
am: dceecbd1fa

Change-Id: If7909669f4a898583b5c65d1b72a9d6f890e9284
2018-04-05 12:41:36 -07:00
Yi Jin
dceecbd1fa Merge "This cl tries to fix cts tests IncidentdTest" into pi-dev
am: 72a39eb3be

Change-Id: Ia9e3f94b367dffc6482f5f3ba12aeaba2eed6874
2018-04-05 12:10:55 -07:00
Yangster-mac
f7cfcc4a07 Merge "Retry logs write when it fails. Report skipped event in statsd." into pi-dev am: 164a73e0cf
am: 0425263117

Change-Id: Icaab7324de5c553e963f646b7c4fec058cab6646
2018-04-05 11:57:46 -07:00
TreeHugger Robot
72a39eb3be Merge "This cl tries to fix cts tests IncidentdTest" into pi-dev 2018-04-05 18:48:59 +00:00
Tej Singh
1a490496fd Merge "BugFix: Config TTL" into pi-dev am: b6d4401da1
am: 6363f4ad3f

Change-Id: Id1eed5cf2ec6b9263eaa3e72ea526958669d08a1
2018-04-05 11:46:30 -07:00
Yangster-mac
0425263117 Merge "Retry logs write when it fails. Report skipped event in statsd." into pi-dev
am: 164a73e0cf

Change-Id: I6aac360fe74bb5ca3e3b95dc3f2685a99da0fe2a
2018-04-05 11:22:16 -07:00
Tej Singh
6363f4ad3f Merge "BugFix: Config TTL" into pi-dev
am: b6d4401da1

Change-Id: I2871fdef3e659e9edf6a97052cb34b5831aebc34
2018-04-05 11:11:36 -07:00
TreeHugger Robot
164a73e0cf Merge "Retry logs write when it fails. Report skipped event in statsd." into pi-dev 2018-04-05 18:04:18 +00:00
Yangster-mac
b8382a10a0 Retry logs write when it fails.
Report skipped event in statsd.

Test: manual test
BUG: b/77222120
Change-Id: I257f5e76d557893c4eb4a8e8a13396d8b5d1afc0
2018-04-04 17:53:48 -07:00
Tej Singh
5260eea5e4 BugFix: Config TTL
In statsStats, we were writing the config TTL reset time to the wrong
proto field number. This fixes that.

Bug: b/77604625
Test: unit tests, pending CTS test
Change-Id: I9f6e502bf13785bfa60d68805d46b9a5c2286f44
2018-04-04 17:34:30 -07:00
Yi Jin
ad3e6e5d5a This cl tries to fix cts tests IncidentdTest
1. Disable BatteryType section which is device-specific
2. Make timeout longer since meminfo section timedout in test
3. make some negative values sint
4. varint can be 64 bits, there is a bug implicitly convert it to 32
which loses values.
5. Found another bug which failed to read 64 bits varint, create a
native test to make sure it works.

Bug: 77291057
Test: atest CtsIncidentHostTestCases:com.android.server.cts.IncidentdTest
Change-Id: I04cc730741f7901f37ac57a11af7777d57118a23
2018-04-04 16:29:55 -07:00
Yangster-mac
63b6e27325 Merge "Statsd config TTL" into pi-dev am: 48920ab48d
am: b05f699b84

Change-Id: I5954542cee188e4226adececcc07e9beea81ad91
2018-04-04 16:12:52 -07:00
Yangster-mac
b05f699b84 Merge "Statsd config TTL" into pi-dev
am: 48920ab48d

Change-Id: I2b06fd144ed95ff2dc1df09a906b073d856a063d
2018-04-04 15:27:09 -07:00
Yangster-mac
b142cc8add Statsd config TTL
Roughly check the config every hour to see whether the ttl expired.
If so, read the config from disk and recreate the metric manager.

Test: statsd test

BUG: b/77274363

Change-Id: I16838afe5bbe966c3a0f638869751f9b59a5a259
2018-04-04 15:59:43 +00:00
David Chen
87b218b091 Merge "Includes annotations with statsd reports." into pi-dev am: b61f80b42b
am: df7f4dd36b

Change-Id: Ia6fde03500c402804c701105bf0ef6b192d0e0b2
2018-04-03 21:03:20 -07:00
David Chen
df7f4dd36b Merge "Includes annotations with statsd reports." into pi-dev
am: b61f80b42b

Change-Id: I0ec92b7e372617a4f45cf2ed22fbbe6b5ced8cbd
2018-04-03 20:31:42 -07:00
David Chen
faa1af535b Includes annotations with statsd reports.
It's tricky to determine the source of the metrics on a device
currently since we can take the union of multiple configs and send
only one giant statsd_config into statsd. We will use the int64 field
to track the sub config id's and the int32 field to track the version
for each sub config, but the fields are named more generically as
annotations.

The annotations are available in both the reports and metadata.

Test: Check that all unit-tests pass on marlin-eng
Bug: 77327261
Change-Id: Ic37c549c8b2991676f69948c515156765c9f5108
2018-04-03 18:20:40 -07:00
Tej Singh
179a148995 Merge "Atoms: remove bluetooth a2dp" into pi-dev am: 287fec6358
am: 836554fb4b

Change-Id: I5feb36c1cf04f58818f96587aa758b473902c5cb
2018-04-03 16:29:00 -07:00
Tej Singh
836554fb4b Merge "Atoms: remove bluetooth a2dp" into pi-dev
am: 287fec6358

Change-Id: Iab0fda3de65619705a072d0e0524f7e6882f7d4a
2018-04-03 16:00:08 -07:00
TreeHugger Robot
287fec6358 Merge "Atoms: remove bluetooth a2dp" into pi-dev 2018-04-03 19:48:33 +00:00
Yangster-mac
08bec83b15 Merge "Move forward the alarm timestamp when config is added to statsd." into pi-dev am: 7219f8bac8
am: 25f94aa599

Change-Id: I332938683e3b2445f68121692e25bf741106f2f6
2018-04-03 11:55:08 -07:00
Yangster-mac
25f94aa599 Merge "Move forward the alarm timestamp when config is added to statsd." into pi-dev
am: 7219f8bac8

Change-Id: I04263e131472d5b0f0f3ffd408988d4b44a6b195
2018-04-03 11:27:50 -07:00
TreeHugger Robot
7219f8bac8 Merge "Move forward the alarm timestamp when config is added to statsd." into pi-dev 2018-04-03 17:57:43 +00:00
Chenjie Yu
24917b5ffe Merge "Add fileds to AppCrash and ANR atoms" into pi-dev am: 60a24b97f7
am: 27b723d0dc

Change-Id: Ia171f05ed7e27dba8fcc48bfc4dc2e08b6fe3f1d
2018-04-03 00:40:36 -07:00
Chenjie Yu
27b723d0dc Merge "Add fileds to AppCrash and ANR atoms" into pi-dev
am: 60a24b97f7

Change-Id: I45399dc23e13fc7030a66f6d6166d6f2434640ba
2018-04-02 22:00:21 -07:00
Tej Singh
02200f9969 Atoms: remove bluetooth a2dp
We are punting this atom. remove it from atoms.proto

Test: build success on marlin
Bug: b/73971848
Change-Id: Ia2da3d673f8d6078304f6bd0d20dbe3c34f079da
2018-04-02 19:37:59 -07:00
TreeHugger Robot
60a24b97f7 Merge "Add fileds to AppCrash and ANR atoms" into pi-dev 2018-04-03 02:31:27 +00:00
Yangster-mac
c04feba805 Move forward the alarm timestamp when config is added to statsd.
Test: statsd test
BUG: b/77344187

Change-Id: Ieacffaa29422829b8956f2b3fcb2c647c8c3eed9
2018-04-02 18:12:36 -07:00
Yi Jin
bce6a41fb8 Remove some letters of verbose log am: ea31cbea93
am: 8700c43483

Change-Id: Iae50eac61ab255113218e3e5503e9f74a40623ff
2018-04-02 18:09:44 -07:00
Yi Jin
194a7f6c86 Merge "Use modern c++ code style for incidentd." into pi-dev am: 56051569ab
am: 85d3cc02a1

Change-Id: Ia85dd17da1e0aefbb3bdece55c96f4e6b6686119
2018-04-02 18:07:02 -07:00
Yi Jin
8700c43483 Remove some letters of verbose log
am: ea31cbea93

Change-Id: Ia1237171d4bcb5c5c86851883f58bbdd1cc7ac22
2018-04-02 23:07:30 +00:00
Yi Jin
85d3cc02a1 Merge "Use modern c++ code style for incidentd." into pi-dev
am: 56051569ab

Change-Id: Ifd36cb23ae185b8a37805deb6163e87a2e9ee1c9
2018-04-02 23:04:07 +00:00
Chenjie Yu
f17bf62f2f Add fileds to AppCrash and ANR atoms
Bug: 77487218
Change-Id: I13fe87c9811e248ed0ee87c64d482c9463d6b9a1
Fix: 77487218
Test: cts test
2018-04-02 15:30:47 -07:00
Yi Jin
ea31cbea93 Remove some letters of verbose log
Bug: 77333635
Test: N/A
Change-Id: I94b288d070dfb372edf345d369d75bb3255f631b
2018-04-02 11:09:57 -07:00
TreeHugger Robot
56051569ab Merge "Use modern c++ code style for incidentd." into pi-dev 2018-04-02 18:01:15 +00:00
Yangster-mac
bfaec8c18a Merge "E2e test for periodic alarm." into pi-dev am: 46eef8d049
am: 5708929c0c

Change-Id: I432b9f5df7e10d3466c2f2fb32e05a1d3722e6fd
2018-03-31 09:45:53 +00:00