Commit Graph

5834 Commits

Author SHA1 Message Date
TreeHugger Robot
97d794084d Merge "Mark bucket as condition_unknown properly" into rvc-dev 2020-06-15 21:22:24 +00:00
TreeHugger Robot
a80c586d4f Merge "Add back missing tidy_checks, since tidy_checks_as_errors isn't enough" into rvc-dev 2020-06-13 22:39:03 +00:00
TreeHugger Robot
893cb7835b Merge "Use tidy_checks_as_errors list instead of -warnings-as-errors=*" into rvc-dev 2020-06-13 22:38:57 +00:00
Tej Singh
756541526a Mark bucket as condition_unknown properly
Previously, if the condition was unknown for the entire bucket, the
bucket would be annotated with a NO_DATA rather than being dropped
because CONDITION_UNKNOWN. This updates all the buckets to be dropped
due to CONDITION_UNKNOWN. Note that this will make the condition unknown
problem appear worse, when in reality it is making our bucket drop
reasons more correct and should not have any impact on the true
CONDITION_UNKNOWN.

Also fix an issue where a test was failing due to a previous test
leaving data persisted to disk. This fix is a hack for now, and should
be properly fixed later.

Bug: 158897179
Test: atest statsd_test
Change-Id: Ic703600d37aa1873ec67cb1a279dcf349d48fc9f
2020-06-13 03:50:59 -07:00
Michael Wachenschwanz
38da493ae4 Merge "Add BlobStore atoms" into rvc-dev 2020-06-13 09:17:54 +00:00
TreeHugger Robot
5c4b92a1b9 Merge "Fix testValueMetric flake" into rvc-dev 2020-06-13 06:38:22 +00:00
TreeHugger Robot
ecb9cfe093 Merge "Fix testMultipleConditions flake" into rvc-dev 2020-06-13 02:42:54 +00:00
TreeHugger Robot
298dd714eb Merge "Incident dump does not include current bucket" into rvc-dev 2020-06-13 02:07:02 +00:00
Muhammad Qureshi
de28706dd2 Fix testValueMetric flake
Don't skip buckets with MULTIPLE_SKIPPED_BUCKETS reason for pushed
metric that is not diffed.

Fixes: 156690892
Test: atest --rerun-until-failure=100
CtsStatsdHostTestCases: android.cts.statsd.metric.ValueMetricsTests#testValueMetriccts.statsd.metric.ValueMetricsTests#testValueMetric
Change-Id: Ic14198d38ab63d99700a4df9e9e7ae04181f5139
2020-06-12 18:33:38 -07:00
Michael Wachenschwanz
1a7f7ab4aa Add BlobStore atoms
Bug: 144155167
Test: atest android.cts.statsd.atom.UidAtomTests
Change-Id: I650dfdf6e2f7b6fff29ba6fdf5010a151fd503b5
2020-06-13 01:17:17 +00:00
Muhammad Qureshi
89358feae4 Fix testMultipleConditions flake
Use vector<int> instead of vector<bool>.
vector<bool> is not thread-safe:
https://en.cppreference.com/w/cpp/container#Thread_safety

Fixes: 156690351
Test: atest --iterations=500
statsd_test:MultiConditionTrigger#TestMultipleConditions

Change-Id: I9121747ffbee0864afbff993e7fe417104827952
2020-06-12 18:09:34 -07:00
Tej Singh
61f869e7bb Incident dump does not include current bucket
This is to avoid value metrics skipping buckets due to
DUMP_REPORT_REQUESTED, since if the metric needs to include the current
bucket under time constraints and needs to pull, it will drop the bucket
since it cannot pull.

Test: atest statsd_test
Bug: 158879346
Change-Id: Ia61e69530456ce2b3530add03ec6e068ffb25fb5
2020-06-12 17:25:17 -07:00
Andy Hung
48cffa3f31 statsd: Add audio device usage protos.
MediaMetricsAudioRecordDeviceUsageReported
MediaMetricsAudioThreadDeviceUsageReported
MediaMetricsAudioTrackDeviceUsageReported
MediaMetricsAudioDeviceConnectionReported

Test: adb shell dumpsys stats --metadata (check 294-297)
Test: statsd_testdrive (294-297)
Bug: 149850236
Bug: 158038205
Change-Id: Idf4e324c06ed3586ba71745d110e721d290a5726
2020-06-12 07:06:28 -07:00
TreeHugger Robot
6dca466770 Merge "GnssStats atom entity name change" into rvc-dev 2020-06-12 08:17:59 +00:00
TreeHugger Robot
d4d283e67d Merge "Increase configs per uid limit to 20" into rvc-dev 2020-06-12 08:12:53 +00:00
Frank Li
64a3cb03e7 Merge "Adding NetworkStack Metrics/atoms" into rvc-dev 2020-06-12 04:50:57 +00:00
Jeffrey Huang
9a65fbdbae Increase configs per uid limit to 20
Bug: 158721606
Test: m -j
Change-Id: I434bb0b9cefa469e4ade5803f93eee780da7cfa9
2020-06-11 17:18:42 -07:00
Jeffrey Huang
0017b441a8 Merge "Avoid timestamp update when data is kept on dump" into rvc-dev 2020-06-11 18:27:49 +00:00
Blake Kragten
850a9d43a5 GnssStats atom entity name change
time_to_first_fix_milli_s  to time_to_first_fix_millis
Bug: 142905639
Test: Compiled

Change-Id: Iddeed5d0211d530369506ad66276b3c23b4c2369
2020-06-11 09:05:39 -07:00
Jeffrey Huang
289eae6dbd Avoid timestamp update when data is kept on dump
Bug: 158703584
Test: atest statsd_test
Change-Id: Ia6814c2cdb67dde2fd790ddc18fc785b1bba062c
2020-06-10 19:01:35 -07:00
Tej Singh
0df64158ff Merge "Remove invalid configs from memory" into rvc-dev 2020-06-11 01:04:21 +00:00
TreeHugger Robot
7131aa361f Merge "Mark fields 100/101 as reserved" into rvc-dev 2020-06-11 01:00:47 +00:00
thiruram
70b0843839 Add sysui module to RankingSelected and UiEventReported atoms.
This would allow StatsLogManager in Launcher to log these events without UiEventLogger.
Test: manual(lunch coral-userdebug && make )
Bug: 158218197
Change-Id: Ifb3a478ad775a594980942d95a51461b1b404873

Change-Id: Ibbd3cbfe361488e9f20e82db12c7522f61f45a8e
2020-06-10 17:50:02 +00:00
TreeHugger Robot
6700d5e48c Merge "idmap2: Set aidl_return to true on success" into rvc-dev 2020-06-10 17:21:49 +00:00
TreeHugger Robot
853191032f Merge "Added data share event types to ContentCaptureServiceEvents atom" into rvc-dev 2020-06-10 11:17:57 +00:00
lifr
1cc318d050 Adding NetworkStack Metrics/atoms
Here are some new atoms we added.
1. NetworkIpProvisioningReported
2. NetworkDhcpRenewReported
3. NetworkValidationReported
4. NetworkStackQuirkReported

Test: Run statsd_testdrive
Bug: 151796056
Change-Id: I1268bdbee11a704705d466567e8ba09748b03bb6
2020-06-10 16:40:31 +08:00
Tej Singh
5a4727d78b Remove invalid configs from memory
Right now if we receive an invalid config update, we keep the existing
config in memory. This makes us remove the existing config so that we
don't have any config for the invalid config key.

Test: atest statsd_test
Bug: 158617758
Change-Id: I9daecb1c96e3a63fea3a45b07d1295f3b4ba452a
2020-06-09 18:50:25 -07:00
Chris Wren
9316569062 pulled atom for Do Not Disturb configuration
Bug: 154254547
Test: atest ZenModeHelperTest ZenModeConfigTest ZenPoicyTest
Change-Id: Ibfcf0f8034b049b1ec790d243e8cb06d71224063
2020-06-09 20:17:10 -04:00
Tej Singh
c80e406e3c Mark fields 100/101 as reserved
Test: treehugger
Bug: 153262441
Change-Id: I22a94171fe3396435e1975748317a6d04cff9ede
2020-06-09 15:21:32 -07:00
Ryan Mitchell
038a284f24 idmap2: Set aidl_return to true on success
idmap2d did not set the aidl return value to true when
IdmapHeader::IsUpToDate succeeded. This regressed OMS initialization
time.

This change sets aidl_return to true when the header is up-to-date and
also replaces usages of `uint32_t` for fulfilled_policies with
`PolicyBitmask`.

Bug: 158491243
Bug: 158535227
Bug: 158468195
Test: enable/disable overlays and onserve that verify succeeds
Test: change the values of enforce overlayable and fulfilled policies
      and confirm that idmap verify fails
Change-Id: If8febbfd0283d53211263690f85e2970706a33b7
2020-06-09 22:21:16 +00:00
Stephen Hines
cb6c91bc8d Add back missing tidy_checks, since tidy_checks_as_errors isn't enough
I unfortunately missed in the original testing that
`tidy_checks_as_errors` isn't sufficient by itself. Instead we need to
have both places with the same variables. A future change will make
Soong expand `tidy_checks_as_errors` into both locations appropriately.

Bug: 119328308
Test: WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=*,-readability-*,-google-readability-*,-google-runtime-references,-cppcoreguidelines-*,-modernize-*,-llvm-*,-bugprone-narrowing-conversions,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-hicpp-*,-fuchsia-* mm
Change-Id: If69f69bf7861ba3569756270381f3f737366f2f0
Merged-In: If69f69bf7861ba3569756270381f3f737366f2f0
(cherry picked from commit 56af59395e)
2020-06-08 20:38:17 -07:00
Stephen Hines
ee78ee9d87 Use tidy_checks_as_errors list instead of -warnings-as-errors=*
This fixes a build break due to new code from
http://ag/I96f970e82b5243be01b205ac2cb6ab249c6100bc that inadvertently
triggers some false positives with other clang-tidy flags. Builds that
use a wider set of tidy flags (as specified in the test below) will
break since `-warnings-as-errors=*` turns all warnings into errors,
rather than just the ones that were specified as part of this
Android.bp. The preferred way of checking this is to use
`tidy_checks_as_errors`

Bug: 119328308
Test: WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=*,-readability-*,-google-readability-*,-google-runtime-references,-cppcoreguidelines-*,-modernize-*,-llvm-*,-bugprone-narrowing-conversions,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-hicpp-*,-fuchsia-* mm
Change-Id: I941b3c89402e2cfa290b3829e2ac8ff7ea67ca3d
Merged-In: I941b3c89402e2cfa290b3829e2ac8ff7ea67ca3d
(cherry picked from commit 0bc6454327)
2020-06-08 20:34:54 -07:00
Mayank Garg
da5ca014d0 Added events in UserHalService for metrics
Bug: 154039755
Bug: 158055752
Test: statsd_testdrive
Change-Id: I9066b48fd85c2a9b8bb955bb93b5339408c7258c
2020-06-08 18:15:38 -07:00
Denny cy Lee
ca62fc4162 Suez: change display wake reason to push atom
Manual CP from master to rvc-dev

Revert a497253
Bug: 150519505
Eldar: 157730539/
Test: m statsd

Change-Id: I93cb9d5d835f139f327f27340d76c78d20e4bceb
Merged-In: I93cb9d5d835f139f327f27340d76c78d20e4bceb
2020-06-08 15:15:50 -07:00
Christine Tsai
0e6be91fd2 Merge "Set current state key earlier and do not reset hasCurrentState" into rvc-dev 2020-06-06 00:32:44 +00:00
Jing Ji
d29532e699 Merge "Use the UID as the package name in procstat assoc proto dump" into rvc-dev 2020-06-05 23:16:36 +00:00
Govinda Wasserman
a4939de50c Merge "Adds Assistant invocation logging to statsd" into rvc-dev 2020-06-05 22:50:15 +00:00
tsaichristine
0893db53f5 Set current state key earlier and do not reset hasCurrentState
- The current state key was updated to the new state key after the diff
calculations and base setting. There are a few cases where we exit the
current loop which results in the current state key not getting updated.
- When we reset the base, we should not reset the current state. All
instances where hasCurrentState was set to false have been removed.
- I added a unit test for a value metric that is sliced by state and has
a condition.

Bug: 157661456
Test: m statsd_test && adb sync data && adb shell
data/nativetest/statsd_test/statsd_test32

Change-Id: Ib75bd9d08e6785f9e03b4b5984dbdaf86a7e1749
2020-06-05 15:26:20 -07:00
TreeHugger Robot
35a18b50c5 Merge "Fix a lambda capture problem in TextDumpsysSection" into rvc-dev 2020-06-05 18:17:22 +00:00
Yara Hassan
1e4256e7f9 Added data share event types to ContentCaptureServiceEvents atom
Amended data share event types in ContentCaptureServiceEvents.Event enum
to use for logging data share events. As data share is currently only used in Now Playing, we only expect a few events logged per day per device.

Bug: 158295023
Test: NA
Change-Id: I79be98c9929582b00b19d278a2b13c591362a227
2020-06-05 17:19:53 +00:00
Ryan Mitchell
2201f8b626 Merge "Add policies and enforce overlayable to header" into rvc-dev 2020-06-05 16:07:28 +00:00
Govinda Wasserman
e464028d9d Adds Assistant invocation logging to statsd
This is the first step in migrating the logging from the old framework.
Once the data has been verified, the old logging code will be removed.

Test: Tested locally
BUG: 147508374
BUG: 155745843
Change-Id: I738278c0a3e1ab42b53300792bfd80ae778d6be1
Merged-In: I738278c0a3e1ab42b53300792bfd80ae778d6be1
2020-06-05 08:46:55 -04:00
Mike Ma
4686c24f53 Fix a lambda capture problem in TextDumpsysSection
The [&] capture does not handle smart pointers (unique_ptr, unique_fd
etc) well, which lead to leaked pointers. Fix by explicitly move the
smart pointers.

Bug: 158097879
Test: Build, flash and take an incident report. Verify no crash
Change-Id: I5150aa3dddf9d59c1c9d6d32370370e8cde23946
2020-06-05 00:51:22 -07:00
TreeHugger Robot
a78a19b336 Merge "Fix ConditionUnknown after valid buckets" into rvc-dev 2020-06-05 02:14:10 +00:00
Jeffrey Huang
3be5671c03 Fix ConditionUnknown after valid buckets
Because non-zero enums are evaluated to true, it is possible for pulls
to occur on bucket split even if the condition is unknown. Explicitly
check that the condition is true instead.

Bug: 155489707
Test: atest statsd_test
Change-Id: I0bc3de6e885c2200885caf01d07c793b83eca17a
2020-06-04 16:54:04 -07:00
Ryan Mitchell
13313007e5 Merge "Revert "Persist implicit overlay configurator actor policy"" into rvc-dev 2020-06-04 23:27:24 +00:00
Jing Ji
1cd1f607e9 Use the UID as the package name in procstat assoc proto dump
And try to compress the process name if possible

Bug: 155980964
Test: Manual
Change-Id: I689724e7c271ba8d85608c3f484250e13c1a1c92
2020-06-04 15:44:26 -07:00
Ryan Mitchell
e88ef74249 Revert "Persist implicit overlay configurator actor policy"
This reverts commit af93f5de66.

The overlays.xml file version should not be reverted to 3.
Increasing the version caused b/158054824 so for devices that have not
upgraded to version 4, do not ignore a version 3 overlay file when
restoring settings. In a future change, we must create testing so that
version upgrades always migrate old overlays.xml files to new
overlays.xml files.

Bug: 157266239
Bug: 158054824
Change-Id: I3f8c49d30a1961a756bbed9b2ab01aeb1f887e55
2020-06-04 21:18:45 +00:00
Henry Fang
fd40c07abe Add the metrics for status of open cas session
Metrics review request:  b/155199791
Metrics design review is updated at https://eldar.corp.google.com/assessments/937523088/drafts/927800491

bug: 154661158
Test: Manual
Change-Id: I9f8ce2e52289130f9fb39a368240676c1792c154
2020-06-03 12:38:03 -07:00
Henry Fang
1ae85bb287 Add the metrics for DVR status
Metrics review request:  b/155199791
Metrics design review is updated at https://eldar.corp.google.com/assessments/937523088/drafts/927800491

bug: 154661158
Test: Manual
Change-Id: I3142b0737f7469a79a526281b75a06d3dbf97483
2020-06-03 12:31:00 -07:00