Commit Graph

6042 Commits

Author SHA1 Message Date
TreeHugger Robot
3c1b9ad9af Merge "Render boot animation with same size as framebuffer" into rvc-dev am: cbea0ab58f am: 937a25de15 am: 35ae2778c3
Original change: undetermined

Change-Id: I4422eda86b261c20a6dd33b0f897f875d004ae4c
2020-06-02 11:16:01 +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
Christine Tsai
1800353f5e Merge "Pass initial conditions to combination conditions and metrics" into rvc-dev am: c5111c995b am: 6470e9c9e3
Original change: undetermined

Change-Id: I55b34f0655f44f4e981d1cc3803bccc79c4edf2d
2020-06-01 21:55:58 +00: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
dac88efb5a Merge changes from topic "vab-extended-metrics" into rvc-dev am: 622a727f9a am: 3476f56b57
Change-Id: If636f87dd3147efc13d1f9caa30fd1a121d2d88f
2020-05-31 12:39:48 +00:00
Alessio Balsini
ddc73b3f3c SnapshotMergeReported: add retrofit and cow image size am: 2294f39e2a am: ed5c67b3ec
Change-Id: Ie324088cec27b6cf965e92de2518012857bdbc56
2020-05-31 12:39:41 +00:00
Alessio Balsini
ed5c67b3ec SnapshotMergeReported: add retrofit and cow image size am: 2294f39e2a
Change-Id: Ie98eadb19a2f0d005f206b3ebdeca6e9f364af02
2020-05-31 12:28:19 +00: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
1d678e4237 Merge "Clean up ConditionTracker variables for tracking unsliced condition" into rvc-dev am: 9d94c092ed am: 50dcb502c0
Change-Id: I3cb2342810aa85e66c6ad00d75180fa176d7bdf0
2020-05-30 11:28:57 +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
c082ec9e32 Merge "Decrease default pull timeout to 2 seconds." into rvc-dev am: ceb2602851 am: 027c998917
Change-Id: Id4569c7e3839749c9e726a9c0e36cc02f6e50554
2020-05-30 10:37:08 +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
a3c37d8ffe Merge "Refactor ValueMetricProducer bucket flush" into rvc-dev am: eaf58a156b am: 2880fdec87
Change-Id: I2360d51c022fac7fa60d621040b7f5c83ffafbaf
2020-05-30 09:31:18 +00:00
TreeHugger Robot
eaf58a156b Merge "Refactor ValueMetricProducer bucket flush" into rvc-dev 2020-05-30 09:01:49 +00:00
Howard Ro
85abf3646f Merge "Populate initial base info with unknown state values" into rvc-dev am: c02b6d445a am: 4bb5968980
Change-Id: Id557ea7a4bc8eed57cfaf4e2a4d6faa13b0f7104
2020-05-30 08:12:09 +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
9d68e61dba Merge "Persist implicit overlay configurator actor policy" into rvc-dev am: 41b850d0a8 am: b0492bd079
Change-Id: I064dab4378bda1c1c2e8209bce93bf92311df886
2020-05-29 23:12:41 +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
879abb109b Merge "StateTracker handles active state changes" into rvc-dev am: 0d45553327 am: e806ea28e3
Change-Id: I5b5dd4e1928f0f78ffc0ad03c98482746a0aa7e5
2020-05-29 14:19:31 +00:00
Christine Tsai
0d45553327 Merge "StateTracker handles active state changes" into rvc-dev 2020-05-29 13:57:20 +00:00
TreeHugger Robot
8b1bfceee7 Merge "Remove SdkExtensionStatus atom" into rvc-dev am: 52a028d625 am: 0460d49b6a
Change-Id: Ia14e991d6fbf16b9b800d8dcb1fb7ed57f79d3fd
2020-05-29 09:50:51 +00:00
TreeHugger Robot
52a028d625 Merge "Remove SdkExtensionStatus atom" into rvc-dev 2020-05-29 09:06:58 +00:00
TreeHugger Robot
adaed650f4 Merge "Restrict state event logging" into rvc-dev am: 938216c073 am: cf9cd33b22
Change-Id: Ib9ddb1703d2577cfe4a6c403fbbbc9fefe2d2f60
2020-05-29 08:23:08 +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
tsaichristine
0f6c1bcbc9 StateTracker handles active state changes
When a state change occurs, metrics should only make certain updates if
the metric is active. This is already handled in CountMetricProducer and
DurationMetricProducer. In ValueMetricProducer, we will return
immediately if the metric is not active during a state change.

Test: m statsd_test && adb sync data && adb shell
data/nativetest/statsd_test/statsd_test
Bug: b/153101724

Change-Id: Ib2a96600a0f1acec054638515d606716cf0ca6b6
2020-05-28 11:11:53 -07:00
tsaichristine
5088e72c53 Populate initial base info with unknown state values
Set the current state key to a HashableDimensionKey with -1
(kStateUnknown) for each sliced state atom. Previously, the current
state key was being set to the DEFAULT_DIMENSION_KEY which is an empty
HashableDimensionKey.

Bug: 155487198
Test: make statsd_test && adb sync data && adb shell
data/nativetest/statsd_test/statsd_test

Change-Id: Icaa187ecae599407695d86eec6104d210aa98714
2020-05-28 10:50:08 -07:00
Ryan Mitchell
af93f5de66 Persist implicit overlay configurator actor policy
This change does three things:

1) If an overlay targets a package that does not declare an overlayable
   and the overlay fulfills the actor policy, the overlay can override
   any resource in the target,
2) The actor policy is now implicitly granted to overlays signed with
   the same signature as the configurator that target white-listed
   target packages regardless of whether or not the target defines an
   overlayable.
3) If an overlay was previously granted the actor policy through the
   mechanism specified in (2), the overlay will continue to fulfill
   the actor policy even if the configurator is removed, changes
   signature, changes to a different package, or the list of
   configurator targets changes. If the overlay target package or
   target overlayable name changes, the persisted setting will be
   reset.

Bug: 157244814
Bug: 157266239
Test: atest OverlayManagerServiceImplTests
Test: idmap2_tests
Change-Id: Iff3937849ad898b1b2d74c2c632a4cdf7690fe10
2020-05-28 10:38:15 -07:00
Muhammad Qureshi
7ce2256a72 Restrict state event logging
Restrict state event logging to AID_* and Mainline module uids.

Bug: 145706772
Test: statsd_test
Change-Id: I5dc244bd1c6c55dc0213c6e236aea93d759b675f
2020-05-27 16:18:12 -07:00
Ruchir Rastogi
11a4060733 Merge "Combine startPull and sendHeartbeat threads" into rvc-dev am: a319112cbb am: abe3b8398d
Change-Id: Ie98de8db51b35cc96b1c3fb9dac986f546814424
2020-05-27 19:21:05 +00:00
Ruchir Rastogi
a319112cbb Merge "Combine startPull and sendHeartbeat threads" into rvc-dev 2020-05-27 19:18:33 +00:00
Ruchir Rastogi
9df029f2fa Merge "Inject DeviceIdle atom before boot completes" into rvc-dev am: e9e4428d4d am: 3939c13ce4
Change-Id: Ie2218a3245e110f64f95badd950b4a5df23057f3
2020-05-27 17:56:20 +00:00
Ruchir Rastogi
e9e4428d4d Merge "Inject DeviceIdle atom before boot completes" into rvc-dev 2020-05-27 17:44:07 +00:00
Ruchir Rastogi
04c3476986 Inject DeviceIdle atom before boot completes
Test: m
Test: manually verified that DeviceIdleModeStateChanged atom gets logged
before boot completes (using ag/11529814 to log)
Bug: 156913221
Change-Id: I3dbf154083f1cbe660625066dc50b6a8ffd60d7c
2020-05-27 17:43:39 +00:00
Ruchir Rastogi
835e75c636 Combine startPull and sendHeartbeat threads
This ensures that only one helper thread is created per subscription.
Previously, there could be up to two.

+ fixes thread sleep duration if the pulled atoms have different pull
frequencies
+ rename attemptWriteToSocketLocked to attemptWriteToPipeLocked

Test: atest statsd_test
Test: atest CtsStatsdHostTestCases:ShellSubscriberTest
Test: manual testing on Android Studio
Bug: 156678125
Change-Id: I7074bbba5981a591a30e8b70a1ad1d83eadfcc30
2020-05-27 08:47:50 -07:00
TreeHugger Robot
d95cebfee2 Merge "Resize boot animation on display changes" into rvc-dev am: 569b3fbfa7 am: 6066c45d80
Change-Id: Iaeee92af7e35a59991d44d2591130f61537e9101
2020-05-27 12:37:27 +00:00
TreeHugger Robot
569b3fbfa7 Merge "Resize boot animation on display changes" into rvc-dev 2020-05-27 12:17:08 +00:00
Marin Shalamanov
1a6e368920 Resize boot animation on display changes
Use DisplayEventReceiver to listen for display hotplug
events and resize the boot animation is display size
changes.

Bug: 156448328
Test: manually make sure the boot animation has correct
dimensions in the following cases
     I. With boot animation file
        1. scrcpy
        2. start boot animation with
              adb shell /system/bin/bootanimation
	   when no physical display is connected (= 480p
           fake HWC display). Use the virtual display from
           scrcpy to check the boot animation size.
        3. connect a 1080p display
           (HWC sends hotplug connect to change the display)
        4. disconnect the real display
     II. Same steps without boot animation file
         (android logo should be displayed)

Merged-In: Ib3f0383686399669e8de10456092baaec607fa01
Change-Id: Ib3f0383686399669e8de10456092baaec607fa01
2020-05-27 11:50:23 +02:00
Chen Zhu
9ff6281b28 Merge "Add test config to statsd_test and apply mainline module" into rvc-dev am: 3079748dd9 am: e2237b9ff3
Change-Id: Ifa3337349bc453bc7b781beccc6a9d65f61135d0
2020-05-27 08:18:50 +00:00
Chen Zhu
3079748dd9 Merge "Add test config to statsd_test and apply mainline module" into rvc-dev 2020-05-27 07:47:03 +00:00
Chiachang Wang
7912eb5ef8 Merge "Add TCP info into DataStallEvent" into rvc-dev 2020-05-27 03:53:17 +00:00
Jeffrey Huang
cadf7e83c0 Merge changes Id23aea5b,I9b5655a2,I17bb6b9f into rvc-dev am: 8eaf1aba00 am: ef6c6ad7ff
Change-Id: I19151bb86750bd41629e53be0e66d92b29bbd27d
2020-05-26 22:08:41 +00:00
Jeffrey Huang
8eaf1aba00 Merge changes Id23aea5b,I9b5655a2,I17bb6b9f into rvc-dev
* changes:
  Avoid coverage gaps from forced bucket splits
  Update ValueMetric to use NO_DATA
  Add a new bucket drop reason for no data.
2020-05-26 21:59:00 +00:00
Jeffrey Huang
f108912d25 Avoid coverage gaps from forced bucket splits
Bug: 157155330
Test: atest statsd_test
Change-Id: Id23aea5b45dc5c3c5cf46b36d9cb2451ee4cf516
2020-05-26 12:35:04 -07:00