Commit Graph

5813 Commits

Author SHA1 Message Date
Jeffrey Huang
0017b441a8 Merge "Avoid timestamp update when data is kept on dump" into rvc-dev 2020-06-11 18:27:49 +00: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
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
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
Jordan Liu
47a0314878 Merge "Add additional CB atoms" into rvc-dev 2020-06-03 17:50:43 +00:00
TreeHugger Robot
cbea0ab58f Merge "Render boot animation with same size as framebuffer" into rvc-dev 2020-06-02 11:05:55 +00:00
Ryan Mitchell
a707013b78 Add policies and enforce overlayable to header
If the fulfilled policies change without the contents of the target
and overlay APKs changing, the idmap for the overlay should be
regenerated. This change adds fulfilled policies and enforce
overlayable to the idmap header so that idmap2d can determine if the
polices or enforce overlayable changed from what was used to generate
the idmap.

Bug: 119328308
Test: idmap2_tests
Test: atest RegenerateIdmapTest

Change-Id: I96f970e82b5243be01b205ac2cb6ab249c6100bc
2020-06-01 16:15:35 -07:00
Jordan Liu
900e5cbd2a Add additional CB atoms
Bug: 154555092
Test: manually verify using testdrive
Change-Id: I14ef01b8383cef4195292e306d89d61809eff68a
2020-06-01 15:50:04 -07:00
tsaichristine
6e2e92d968 Pass initial conditions to combination conditions and metrics
SimplePredicates have a configurable initial value that can be set to
unknown or false. Previously, CombinationPredicates and MetricProducers
were automatically initialized with an unknown condition value instead
of being synced with the conditions of the SimplePredicates that they
rely on.

An initial condition cache is used to store initial conditions of
ConditionTrackers after they are initialized.
CombinationConditionTrackers evaluate their initial condition based on
the initial conditions of their child SimpleConditionTrackers.
MetricProducers also use the initial condition cache to set its
condition during initialization.

Added unit tests in SimpleConditionTracker_test to check that
SimpleConditionTrackers have the correct initial conditions based on
what the InitialValue is set to and the condition is updated properly
after the first few condition change events.

Added unit test in MetricsManager_test to check that all
ConditionTrackers and MetricProducers have the correct initial
conditions.

Test: m statsd_test && adb sync data && adb shell
data/nativetest64/statsd_test/statsd_test64
Bug: b/156762672

Change-Id: I9f6088f8c92fb18eb2ca8632aaa338fb0ed8e679
2020-06-01 09:25:02 -07:00
Alessio Balsini
622a727f9a Merge changes from topic "vab-extended-metrics" into rvc-dev
* changes:
  UpdateEngineUpdateAttemptReported: add super and slot size, and free space
  SnapshotMergeReported: add retrofit and cow image size
2020-05-31 12:20:41 +00:00
Howard Ro
9d94c092ed Merge "Clean up ConditionTracker variables for tracking unsliced condition" into rvc-dev 2020-05-30 11:06:42 +00:00
Howard Ro
ceb2602851 Merge "Decrease default pull timeout to 2 seconds." into rvc-dev 2020-05-30 09:59:13 +00:00
TreeHugger Robot
eaf58a156b Merge "Refactor ValueMetricProducer bucket flush" into rvc-dev 2020-05-30 09:01:49 +00:00
Howard Ro
c02b6d445a Merge "Populate initial base info with unknown state values" into rvc-dev 2020-05-30 07:41:25 +00:00
Jeffrey Huang
56ff8f3422 Refactor ValueMetricProducer bucket flush
refactor to simplify the condition nesting in flushCurrentBucketLocked

Bug: 157155330
Test: atest statsd_test
Change-Id: Ieff0e8d8d65e1a4c9fc576e68fd7fa912849f806
2020-05-29 17:15:19 -07:00
Tej Singh
73bad98e46 Decrease default pull timeout to 2 seconds.
This can result in more pull failures, but can prohibit slow pullers
from slowing down statsd.

Test: atest GtsStatsdHostTestCases
Test: atest statsd_test
Test: atest FrameworkStatsdTest
Bug: 154056912
Change-Id: Ie30bd3584d808bb11aaaf0fe2057c9adfb198644
2020-05-29 23:37:03 +00:00
Ryan Mitchell
41b850d0a8 Merge "Persist implicit overlay configurator actor policy" into rvc-dev 2020-05-29 22:44:51 +00:00
Alessio Balsini
d8698fa6be UpdateEngineUpdateAttemptReported: add super and slot size, and free space
Additional information are important to evaluate the impact of Virtual
A/B on devices especially related to OTA take rate.
In order to find a correlation between the OTA take rate and the storage
composition, the following metrics are added to the
UpdateEngineUpdateAttemptReported:
- super_partition_size_bytes: the size of the super partition,
- slot_size_bytes: the size of the current slot, and
- super_free_space_bytes: representing the free space in the super
partition.

Bug: 154016862
Bug: 157720191
Test: m
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I9a6146831a4d6254f8c4d1bfe0df9ca97ef15d34
2020-05-29 20:15:47 +01:00
Alessio Balsini
2294f39e2a SnapshotMergeReported: add retrofit and cow image size
Additional information are important to evaluate the impact of Virtual
A/B on devices especially related to OTA take rate.
Take rate is strictly related to the space that is temporarily allocated
in the /data partition (cow_file_size_bytes), as well as knowing if the
device has been upgraded to use Virtual A/B (is_vab_retrofit) or if the
feature was natively supported.
Add these new fields to the SnapshotMergeReported metric.

Bug: 154016862
Bug: 157720191
Test: m
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: Iae8310a8f5364ee94fc8ad6e55362d86cb0752d8
2020-05-29 20:15:31 +01:00
Marin Shalamanov
047802d416 Render boot animation with same size as framebuffer
When ro.surface_flinger.max_graphics_{width|height} is
set the framebuffer size is limited by this property.
However the boot animation size matches the display active
mode size which can cause it to be off-center or partially
visible.

This change limits the boot animation surface size with
accordance with ro.surface_flinger.max_graphics_width.

Bug: 153991408
Test: manual
Change-Id: Idfd1c9adc1f6b10f44bc04ec2078dbc823f28ed6
2020-05-29 18:15:52 +02:00
Christine Tsai
0d45553327 Merge "StateTracker handles active state changes" into rvc-dev 2020-05-29 13:57:20 +00:00
TreeHugger Robot
52a028d625 Merge "Remove SdkExtensionStatus atom" into rvc-dev 2020-05-29 09:06:58 +00:00
TreeHugger Robot
938216c073 Merge "Restrict state event logging" into rvc-dev 2020-05-29 07:50:58 +00:00
Howard Ro
21c9b4d78e Remove SdkExtensionStatus atom
This atom was meant to be a temporary atom which needs to be removed.
This is the right time for that.

Bug: 157708974
Test: make
Change-Id: I87e5bd4dd7b460574c17c685d56200a3c7b14292
2020-05-28 23:56:56 -07:00
tsaichristine
fe46973f26 Clean up ConditionTracker variables for tracking unsliced condition
Variables mNonSlicedConditionState and mUnSlicedPart both track the
unsliced condition in ConditionTrackers. However, they are used
inconsistently. These variables can be replaced with one variable and
duplicate logic can be cleaned up.

Bug: b/157079077
Test: m statsd_test && adb sync data && adb shell data/nativetest/statsd_test/statsd_test
Change-Id: I00b577e09a1fd703624eb61eabf2e1c6fee26731
2020-05-28 11:44:13 -07:00