1505 Commits

Author SHA1 Message Date
Stanislav Zholnin
32bf74150c Merge "Add atom for logging of ReviewPermissionsFragment actions." into qt-dev
am: 15ae30124d

Change-Id: Ideec2a7b87b5089e3b343212cb8656c3326a0e11
2019-06-13 13:27:34 -07:00
TreeHugger Robot
15ae30124d Merge "Add atom for logging of ReviewPermissionsFragment actions." into qt-dev 2019-06-13 20:15:35 +00:00
Tej Singh
52cfa0e455 Merge "Persist metric activation across beta4/5 ota" into qt-dev
am: 12ae95987b

Change-Id: I8d989540dd6807c539026e8c912c581de82b324c
2019-06-08 09:06:32 -07:00
TreeHugger Robot
12ae95987b Merge "Persist metric activation across beta4/5 ota" into qt-dev 2019-06-08 14:38:06 +00:00
Tej Singh
cbf2c64024 Persist metric activation across beta4/5 ota
In beta 4, activeEventActivation proto object does not have a state
field and assumed to be active if it is written to disk. In beta 5, we
add a state field to support persisting metric activation status across
a system server crash. However, if a device updated from beta 4 to 5, we
don't have any knowledge of the state when we read. Therefore, assume
the lack of the state field as the event activation should be active for
the provided ttl.

Bug: 134795027
Test: used flashstation to flash a device to beta 4. Then manually push
and activate a simple config. Then use vendor/google/tools/flashall to
update to qt-dev + this change. Manually ensure metric/config are still
active.
Test: gts-tradefed run gts-dev --module GtsStatsdHostTestCases
Test: bit statsd_test:*

Change-Id: I8594d04efaa2ae1f669113aaffd33e5fa5851e73
2019-06-07 17:56:24 -07:00
Stanislav Zholnin
3d215df180 Add atom for logging of ReviewPermissionsFragment actions.
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 211
Bug: 133401502
Bug: 134581123
Change-Id: I326731e70221c1a28568573a241592006d1bb59e
2019-06-07 14:33:42 +00:00
Tej Singh
e4677ac1d2 Merge "Blacklist truncated atoms instead of whitelistnig" into qt-dev
am: 85a3a4689c

Change-Id: I6322b4844a49ef6d5257f29751b7486e14fc6586
2019-06-06 19:49:39 -07:00
TreeHugger Robot
85a3a4689c Merge "Blacklist truncated atoms instead of whitelistnig" into qt-dev 2019-06-07 02:35:51 +00:00
Tej Singh
44149fc2c1 Merge "Allow same matcher to cancel >1 event activation" into qt-dev
am: de7e1ccb0c

Change-Id: I53a6d2a429dd379b6334f719cfcce3ae308cb9a6
2019-06-05 23:23:54 -07:00
Tej Singh
29ac601429 Blacklist truncated atoms instead of whitelistnig
We used a whitelist to determine which atoms should have their
timestamps truncated to the nearest 5 minutes. This changes the logic
to a blacklist so that we can get fine grained timestamps from vendor and
mainline atoms. Also reserves a range for atoms that need to be
truncated in the future.

Bug: 134574701
Test: inspected generated statslog.cpp file to make sure it had the
correct blacklist
Test: testdrive on ScreenStateChanged to ensure timestamps are preserved
when they should be
Test: testdrive on CallStateChanged to ensure timestamps are truncated
when they should be.

Change-Id: Id3468542c830cdf41395a94c77f7df0b46cd11b7
2019-06-05 18:10:12 -07:00
Tej Singh
ee4495e6e2 Allow same matcher to cancel >1 event activation
Previously,we could only have one deactivation matcher for a given
metric. This meant that the same matcher could not be used to cancel
several (or all) event activations of a metric. This fixes that bug.

Test: bit statsd_test:*
Bug: 134185513
Change-Id: I9d74878c9e09bd1f58c8f3dcffe1092edf490329
2019-06-04 13:03:38 -07:00
Yao Chen
ae8cff710b Merge "Fix a bug in saving local history of the metrics report." into qt-dev
am: 6d647b78d3

Change-Id: I69258e0cb237f501e2962f216396889ec0521098
2019-06-03 20:38:49 -07:00
Yao Chen
6d647b78d3 Merge "Fix a bug in saving local history of the metrics report." into qt-dev 2019-06-04 03:31:15 +00:00
Yao Chen
5c10cb48a9 Fix a bug in saving local history of the metrics report.
A condition was reversed in code refactoring during previous code review.

Test: unit tests added for all 4 combination cases.
Bug: 134417583
Change-Id: Id79a827ec7a5404b9006769f9595de773b4724ef
2019-06-03 15:02:30 -07:00
Muhammad Qureshi
4bb07913b4 Merge "Handle condition changes when metric is not active." into qt-dev
am: d0ffaeb4b5

Change-Id: I9bdcd3610d8600cafd8f5fcb2cfec7709fd2fc91
2019-05-31 22:35:25 -07:00
TreeHugger Robot
d0ffaeb4b5 Merge "Handle condition changes when metric is not active." into qt-dev 2019-06-01 05:31:14 +00:00
Muhammad Qureshi
18e469298e Handle condition changes when metric is not active.
Treat metric activation like conditions as much as possible. Keep track
of condition changes even when metric is not active. Right now, we
ignore all condition changes if metric is not active.

This is a band-aid fix. Ideally, we should re-think how metric activation is
implemented and consider implementing it as a condition with a timebomb.

Bug: 130838341
Test: statsd_test
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t
android.cts.statsd.metric

Change-Id: I96bb7a7c6ee88359f310065e166f858be945eaff
2019-05-31 15:38:36 -07:00
Hongyi Zhang
4e5d2a48c1 Merge "Add Usage info for LocationManager's APIs" into qt-dev
am: 11ddc8ea0b

Change-Id: I048d9b1fec5120a268a56693cdface47c1cc08c9
2019-05-30 12:39:03 -07:00
Hongyi Zhang
700137e637 Add Usage info for LocationManager's APIs
All new code in LMS wrapped with try/catch and swallowing exceptions
to make sure new code never crashes LocationManagerService.

Bug: 133906682,133190291
Test: Tested with (statsd_testdrive + gnss test apk). Work as intended.
Change-Id: I989b1361c029e76d35861cf23d5c3d152f0bf81a
2019-05-30 03:41:17 +00:00
Thierry Strudel
618e3eabcd Merge "statsd: Remove repetitive logging if ODPM is not present" into qt-r1-dev 2019-05-29 16:44:23 +00:00
Benjamin Schwartz
c0bb3fe2ef statsd: Remove repetitive logging if ODPM is not present
Bug: 133674207
Test: adb shell cmd stats pull-source 10038
Test: tested above command on Pixel device without ODPM
Change-Id: Iae8fe3c824167dad2659c1f8172f7646d7925d32
2019-05-28 17:10:42 -07:00
Andrew Nguyen
33ec4cc349 Revert "Add VehicleMapServicePacketReported and"
This reverts commit ee615d6ed597bf558b526dcfb87c993fe0fb6648.

Reason for revert: We will be adding these in a later release.

Test: None
Change-Id: I7cee23d246b7677a79a9055976e27a10a55efb1c
Bug: 131921165
2019-05-28 16:30:45 +00:00
Hyunyoung Song
2f6110f832 Merge "Add live wallpaper metrics to atoms.proto" into qt-dev 2019-05-24 22:43:04 +00:00
Stanislav Zholnin
d904cb583b Merge "Add PermissionFlags field to DangerousPermissionState atom." into qt-dev 2019-05-24 10:43:54 +00:00
Stanislav Zholnin
75c3fd1ef5 Add PermissionFlags field to DangerousPermissionState atom.
Bug:133401502

Change-Id: I0072ab374b85609636c1f32e55154badf7bf9dc0
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive 10050
2019-05-24 10:43:34 +00:00
TreeHugger Robot
51f286c974 Merge "Testdrive: allow multiple atoms in pulled atoms" into qt-dev 2019-05-24 06:29:14 +00:00
Kunhung Li
286c52f8c2 Add live wallpaper metrics to atoms.proto
Resue StyleUIChanged message to append live wallpaper events.

Test: make statsd_testdrive && statsd_testdrive 179
Bug: 133209268
Bug: 127745228
Change-Id: I864d8e35bd071f7bcd2249ef20446a42a680dc6d
2019-05-24 01:42:15 +00:00
TreeHugger Robot
585422a5d2 Merge "Fixes the bug that can occur when StatsCompanionService calls StatsService to update UID data and overflows kernel transfer buffer." into qt-dev 2019-05-24 00:26:19 +00:00
Max Dashouk
11e0d40bbe Fixes the bug that can occur when StatsCompanionService calls
StatsService to update UID data and overflows kernel transfer buffer.

In this case, the IPC call silently fails. The issue was discovered in Android Automotive Embedded use case that employs multiuser setup. This causes more uid data being sent via one-way StatsCompanionService::informAllUidData call than usual and can trigger the issue. As the result, uid map on statsd side is empty and many metrics are not captured.

Bug: b/132444397
Fixes: b/132444397
Test: Did a clean build of master branch and flashed the device. adb
shell cmd stats print-uid-map returned without any result. Repeated the
steps after implementing the fix, print-uid-map returns the results now.

Change-Id: I1451c13b36696449c145c51618c68d10e29a596a
2019-05-23 20:53:58 +00:00
TreeHugger Robot
42fb4bb1e9 Merge "Statsd: Add watchdog rollback to experiment ids" into qt-dev 2019-05-23 19:25:43 +00:00
Ben Murdoch
3389f152ad Add worksource AAB bucket to WakeupAlarmOccurred WW atom.
This will enable us to breakdown number of alarms triggered by
app standby bucket.

Bug: 132227621
Test: statsd_testdrive 35

Change-Id: I4cb6c1e631ac940bedaff734cc40b1512405bf33
2019-05-21 19:33:11 +01:00
Tej Singh
73f8e9b086 Statsd: Add watchdog rollback to experiment ids
Stores experiment ids to disk for watchdog rollback initiate/success
events as discussed.

Test: gts in topic
Bug: 131768455
Change-Id: I32768fe5c5c21c43811e25d8f87faae0c8d82c1f
2019-05-20 22:52:40 +00:00
Ben Murdoch
ffc816283e Merge "Add Standby Bucket and job duration to ScheduledJobStateChanged atom." into qt-dev 2019-05-20 08:18:34 +00:00
Yao Chen
d42cbcf9cf Merge "Add alert description to IncidentDetails in statsd_config" into qt-dev 2019-05-16 21:09:55 +00:00
Adam He
815979d5df Merge "Metrics for content capture." into qt-dev 2019-05-16 19:53:04 +00:00
Yao Chen
9f7969e1b5 Add alert description to IncidentDetails in statsd_config
Bug: 132890267
Test: statsd_test
Change-Id: I68ad2cec07d17f3e4db40c780713d5d0228831a7
2019-05-16 10:34:18 -07:00
Tej Singh
97b2e1a6ea Testdrive: allow multiple atoms in pulled atoms
Modifies statsd_testdrive to allow up to 100 atoms to be pulled at a
time. Uses trigger event with app breadcrumb so that the puller happens
once.

Bug: 128893770
Test: statsd_testdrive 10021 (temperature)
Change-Id: I185a7eb1b32a6b19596601dcf5a1ba7a633e4e35
2019-05-15 21:19:10 +00:00
TreeHugger Robot
7ee86cdb65 Merge "Persist active metric status across system server" into qt-dev 2019-05-15 20:45:31 +00:00
Adam He
ff2185346e Metrics for content capture.
Bug: 119613670
Test: statsd_testdrive & manual test
Change-Id: Ib2c61d2a3c08a9db779790417eb0177c2420d8fd
Merged-In: If43465ccee7454a7ebf9e15caa23fce7bae33cfe
2019-05-15 11:12:02 -07:00
Martijn Coenen
fcbd9112e6 Merge "Atom and puller for historical AppOps." into qt-dev 2019-05-15 12:19:10 +00:00
Ben Murdoch
741e335458 Add Standby Bucket and job duration to ScheduledJobStateChanged atom.
This fields enable us to slice job metrics by bucket and gain insight
to the average time spent executing jobs in each bucket. The metrics
we'll write for this data will help to tune thresholds for throttling
background behavior in Q.

BUG: 132227621
Test: make statsd_testdrive && statsd_testdrive 8

Change-Id: I1af94dc4a8e51f9741f48c817d1d2f99f164858d
2019-05-15 10:58:49 +01:00
Martijn Coenen
cd95d4613f Atom and puller for historical AppOps.
This atom contains information about historical AppOps performed by
applications.

Bug: 128925078
Test: builds
      adb shell cmd stats pull-source 10060

Change-Id: Iaaec0987712779e2062139d3ad0e2d4544d4d45f
2019-05-14 14:05:04 +02:00
Tej Singh
f53d445cef Persist active metric status across system server
Previously, all metrics/configs would deactivate on system server death.
Now, active status is restored.

Bug: 129717537
Test: bit statsd_test:*
Test: libprotoutil_test:ProtoOutputStream*
Change-Id: Idf372457f60a931a2d00176a5eab58c534a25e41
2019-05-13 15:37:19 -07:00
Tej Singh
c920308e58 CTS: StatsLog.writeRaw()
CTS test for StatsLog.writeRaw(). Tests writeRaw using the app
breadcrumb atom to get some cts coverage.

Test: cts-tradefed run cts-dev --module CtsStatsdHostTestCases
Bug: 130238616
Change-Id: I44d4a0e618617002c9ff55cfe86fd1cbf29116c5
2019-05-13 12:06:23 -07:00
Yuncheol Heo
d1a85d2d7e Add CarPowerChanged, GarageModeInfo atom.
Bug: 131688824
Bug: 131086247
Test: It builds.
Change-Id: Ie67ea04107c6aa2929a1e6b859ddabda8494437e
2019-05-11 06:05:41 +00:00
TreeHugger Robot
5f8a9547e8 Merge "GpuStats: track CPU Vulkan implementation usage" into qt-dev 2019-05-10 19:02:49 +00:00
Andrew T Nguyen
ee615d6ed5 Add VehicleMapServicePacketReported and
VehicleMapServicePacketFailureReported to atoms.proto.

Test: none
Change-Id: I0c9933e11e4b9539546150e810e8332f51aa6382
Bug: 131921165
2019-05-10 18:54:47 +00:00
Yiwei Zhang
7c70930267 GpuStats: track CPU Vulkan implementation usage
Bug: 131927737
Test: atest GpuStatsPuller_test
Change-Id: I003f6a169886bf1acf131a7dd4811ebd48e4120e
2019-05-09 23:46:53 +00:00
TreeHugger Robot
0d4716fcd2 Merge "GpuStats: Track ANGLE usage info" into qt-dev 2019-05-09 19:58:15 +00:00
Yiwei Zhang
a0f5fefb8f GpuStats: Track ANGLE usage info
Bug: 132285967
Test: atest GpuStatsPuller_test
Change-Id: I1763624fe705b6d3a3ccc3bdbddfa573362ddc27
2019-05-08 17:05:54 -07:00