With b/152655547, all aidl_interface modules are considered as stable
unless it is explicitly with "unstable: true". This change marks the
aidl_interface that are not used across updatable module bounraries
as unstable, so that the build system does not run the API
dumping/checking on them.
Bug: 152655547
Test: m
Change-Id: I1257c66de6dd42b2d32d47ed74cb2878f79d14fb
Makes a test mapping for statsd so that unit tests run on presubmit.
Changes to make the tests pass:
1. Require root. This is needed to write to disk, since the tests don't
run as statsd's uid
2. Remove AndroidTest.xml file in favor of the autogenerated one.
3. Remove a check in StatsService.test for getUidFromArgs. The test
checked a failure case where we passed a number bigger than INT32_MAX.
However, on a 32 bit device, strtol will return INT32_MAX when an
overflow happens, since it returns a 32 bit number on a 32 bit device.
4. Refactor a lot of e2e tests to sort dimensions, ensuring that the
dimensions are always in order, instead of relying on implicit ordering
of hashing, which can change.
5. Change a long to an int64 in TestActivationsPersistAcrossSystemServerRestart
Test: statsd_test
Bug: 129613474
Change-Id: I80dfa3bfd50ebe6d2c8c0c3ba201f3ad06b68910
This method consolidates logic of testing whenever rebooting userspace
is supported in a place that can be used both from
PowerMager.isRebootingUserspaceSupported() API and from
PowerManagerService.reboot() implementation.
Consequently, this makes `adb shell svc power reboot userspace` also
benefit from that check, and fail userspace reboot on devices that don't
support it.
Also tweaked logic of ignoring RemoteException to take into account
userspace reboot.
Test: adb root
Test: adb shell setprop init.userspace_reboot.is_supported 0
Test: adb shell svc power reboot userspace & verified error message
Test: adb shell setprop init.userspace_reboot.is_supported 1
Test: adb shell svc power reboot userspace & verified no error message
Test: atest PowerManagerTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I2d3a8e0ae1320c408a838c5c5fdf4cd977b167b3
Instead of using the map from atoms_info, we now receive uid information
in the form of StatsEvent annotations. The isUid annotation is exposed
from both LogEvent and FieldValue.
Test: bit statsd_test:*
Test: atest GtsStatsdHostTestCases
Bug: 150414601
Change-Id: Iebbe4ce5668de1ab91485daa1be9197cde6e8309
Abstract test utilities into two new functions: writeAttribution and
parseStatsEventToLogEvent
Bug: 149590301
Test: bit statsd_test:*
&& bit statsd_benchmark:*
Change-Id: I5f77646b6d2d828344b8b6de8777a60d98f96d58
StatsPullerManager should be declared on the heap because wp's can only
point to objects on the heap.
Test: bit statsd_test:*
Test: atest GtsStatsdHostTestCases
Test: atest CtsStatsdHostTestCases
Bug: 153237308
Change-Id: I579375f5bd2db9557f108f39916d69f368865478
Now that MediaProvider is a mainline module, we need to whitelist it in
statsd in order to enable pushing metrics from it.
Test: ./out/host/linux-x86/bin/statsd_testdrive -p \
com.google.android.providers.media.module 233
Fix: 153160314
Bug: 149669087
Change-Id: I5237663de2b24d467283d2c2b60f7155fb5b5e53
Rename MediaProvider atoms to past tense verbs.
Slightly redefine the atoms for MediaProvider event metrics.
The changes are:
1. Remove timestamps from all atoms (because WW already attaches
timestamps to its events).
2. Log UIDs instead of package names.
Test: build
Bug: 149669087
Change-Id: I6bfb1da7e645f86d1b4a850f68614bc8fe105568
Adopt the autogenerated API on R branch by adding module for my atom.
Metrics council review bug: 151768952
Bug: 150979527
Test: the Android tree still builds normally
Change-Id: I608d2d8f2afd83a3975d8ffa844bc9310d988817
This change adds tests that run in presubmit to verify that updating
the target APK invalidates the idmap for overlays targeting the
target.
Bug: 147794117
Bug: 150877400
Test: atest PackagedUpgradedTest
Change-Id: I0268ea99dc7beb4bbc7009a67d9929e2d82862cb
When the target package update, check if the idmap file must change.
If so, propagate the idmap changes to the targets overlay paths, and
invalidate cached overlay ApkAssets in ResourcesManager.
Bug: 147794117
Bug: 150877400
Test: OverlayRemountedTest
Test: libandroidfw_tests
Change-Id: I6115c30bae3672b188a5ff270720a0eea15b43b5
Link libgtest_prod, libprotobuf-cpp-lite, and libc++ statically.
This reduces the size of the statsd apex from 2.8M to 1.6M.
Initial:
blueline:/apex/com.android.os.statsd # du -h
16K ./lost+found
764K ./bin
1.3M ./lib64
8.0K ./etc
600K ./lib
120K ./javalib
2.8M .
After linking proto lite and libgtest_prod statically (saves ~500kb):
blueline:/apex/com.android.os.statsd # du -h
16K ./lost+found
800K ./bin
876K ./lib64
8.0K ./etc
600K ./lib
120K ./javalib
2.3M .
After also linking libc++ statically (saves ~700kb):
blueline:/apex/com.android.os.statsd # du -h
16K ./lost+found
0.9M ./bin
296K ./lib64
8.0K ./etc
204K ./lib
120K ./javalib
1.6M .
After this change, the only libraries in both /lib and /lib64 are:
libstats_jni.so
libstatspull.so
libstatssocket.so
These are the 3 libraries we actually want to ship.
Test: m
Test: bit statsd_test:*
Test: atest GtsStatsdHostTestCases
Test: manually inspecting the size of the apex, statsd binary, and
libraries
Bug: 153349706
Bug: 153349659
Bug: 153350187
Change-Id: I00796fc1cf33e394422c6dc617a8430a5f5c5bbb
(a) Clean up LogEvent::parseBuffer - having those variables be member
variables really helps with code readability.
(b) Don't hold locks when writing to pipe within ShellSubscriber -
ag/150969574 describes why holding a lock is necessary.
Test: m
Bug: 150312423 (allows this bug to be marked as obsolete)
Change-Id: I4903de1dc87a552932b70e5975a7cde91df05b3b
- Add AnnotationId enum stats-log-api-gen
- Rename RESET_STATE annotation to TRIGGER_STATE_RESET. Also rename the proto annotation.
Bug: 152412767
Test: stats-log-api-gen-test
Test: m statslog-framework-java-gen
Change-Id: I2c12ea0b9222ef28b8cc11ea36b272e518a96259
After switching to the new socket schema, we can remove certain LogEvent
constructors. AttributionNodeInternal was only used in tests and can be
removed as well.
Bug: 14959031
Test: bit statsd_test:*
Change-Id: Ib5cb6acc50cc4d37a46a076d41face452a0a87d8
StateConditionTracker was previously used as a way to slice by state
through a specific SimplePredicate definition. It is currently being
replaced by StateTracker, and no metrics use StateConditionTracker at
this time.
Bug: 136566566
Test: bit statsd_test:*
Change-Id: I1a14747907c23482a1b7500c6d7f07cd2f1d4aed
- Added #onStateChanged logic to DurationMetricProducer
- Only SUM aggregation type supports state slicing.
OringDurationTrackers now track durations keyed by different state
values.
- Added unit tests for DurationMetricProducer state changes
Test: bit statsd_test:*
Bug: 145838038
Bug: 136566566
Change-Id: I87dcc21bb904ef0fa76ea196d60dadae00f310fa
Merged-In: I735c7deee96639c32cad4b907e59b354dfd98d77
Set linkToDeath for IPullAtomCallbacks and remove them from the puller
map.
Bug: 146439412
Test: bit statsd_test:*
Test: manually killed system server and made sure all binder deaths were
received
Change-Id: Iba440156b9832d6514d8a9515124d29227dd4123
A new field was added where bus can be specified for testing uhid
devices. This commit adds the relevant documention to the README.
Bug: 144949707
Test: none
Change-Id: If5f6673dd0fdd268b702119b6ccd4abdc37f65bd