This is the base atom for all TIF metrics
Test: ./out/host/linux-x86/bin/statsd_testdrive
Bug: 165369586
Change-Id: I2e5c3e7f51abd2700611fcc0eaef91ec029513c8
Introduce camera system health atoms, including:
- Camera open, close, and session creation time
- Camera session and stream combination information,
- Stream statistics:
- stream width, height, format, dataspace, usage flag,
- max buffer count
- buffer loss
- first frame latency.
Test: ./out/host/linux-x86/bin/statsd_testdrive 227
Test: CTS PerformanceTest
Bug: 154159000
Change-Id: I858d64f3324bb9652a59e5857f2730c92c616a8e
An existing activity may be relaunched when moving from background
to front if the current configuration is changed and the activity
cannot handle the change.
The relaunch type was reported as a hot start because its process
is alive and the original activity exists. But the relaunch needs to
destroy the original activity and create a new instance, which may
even take longer time than a warm start. So the case should be
separated from hot start.
Also:
- Make WaitResult#launchState is always populated by
ActivityMetricsLogger, so "am start -W" can get consistent
launch type.
- Remove dead code in ActivityRecord#ensureActivityConfiguration
that it already early returns if !attachedToProcess.
Bug: 172528316
Test: atest ActivityMetricsLaunchObserverTests#testLaunchState
Change-Id: I3ef64ce1e23b2f13d42fa2b12bc31c0cdb4652fc
Adds a unit test for updating states. Mostly to ensure that replaced
states are calculated correctly.
Also refactor the logic a bit to make it easier to test.
Test: atest statsd_test
Bug: 162323667
Change-Id: Ie0e72c25c879d1c4dd59c330d40e5757ef750ec5
1. Add svc usb getUsbSpeed method
2. Add svc usb getCurrentGadgetHalVersion method
Bug: 168282708
Test: build pass and get test result
Change-Id: Id3480757fd3545b0cce083aaa3cf906e09ae318c
To support local development work, add new "xml2abx" and "abx2xml"
shell utilities which offer to convert between human-readable XML and
our new binary XML protocol.
Interally this utility uses Xml.copy() which is already covered by
existing unit tests that verify lossless conversion between the two
underlying protocols.
Bug: 171832118
Test: manual
Change-Id: I2f4c9850754cafb2bb31eeefa6bd611360963b03
* changes:
[am/incremental] add package loading info in main logcat for crash/ANRs
[metrics/incremental] add package loading info in ANR and crash metrics
On ANR or crash, ProcessRecord will obtain the package loading info from
Package Manager and log it as part of the Westworld metrics "ANROccurred".
BUG: 162600251
Test: atest CtsStatsdAtomHostTestCases:android.cts.statsdatom.statsd.UidAtomTests#testANROccurred
Change-Id: I4b527d731c59c6590771f898c26bfeacb16e6ad5
- init new/replaced metrics
- guardrails for number of metrics/matchers/conditions/alerts
- report update to statsdstats
- update if the config is active
Test: atest statsd_test
Bug: 162323476
Change-Id: Ieaa2d18903de8020fcee5bb128124ab19f10a152
This makes two changes to enable the instrumentation of system server
and other system processes:
- A new option '--no-restart' has been added to 'am instrument', that
causes the test apk to be loaded without restarting the target app.
- On debuggable devices, the check that the test apk has the same
signature as the target app is not performed.
With these changes, a test apk with instrumentation configured
with targetPackage="android" can run a test from within the system
server process, on debuggable devices. These options may also allow
other system processes to be tested.
See go/internal-api-testing for more information.
Test: atest FrameworksInProcessTests
Change-Id: I8829bcbe7f3373170bcf1e7fa869d5d31f40576d
Completely resets the allowed log sources from scratch.
Also:
- renamed initLogSourceWhitelist to initAllowedLogSources.
- refactored tests to have cleaner asserts on data structures
Test: atest statsd_test
Bug: 162323471
Change-Id: Ie717da732eea82c764b5b1f272080a4d97a7a8eb
This is the same as initializing because alarms have no state to carry
over. We can just replace them all without losing anything.
Test: atest statsd_test
Bug: 162323547
Change-Id: Ia2fb33e9ac79476babce57e2e0fb1ca49091e260
Preserves alerts if the definition didn't change and the underlying
metric didnt change.
All alerts need to be readded to the metric b/c metrics will always
clear the alerts on config updates. In the existing code, the metric
producer created the AnomalyTracker (since duration metrics need
DurationAnomalyTrackers). Preserved alerts already have an
AnomalyTracker. Therefore, we need a second overload of
addAnomalyTracker within MetricProducer to add existing ones. Note that
we don't need to worry about the type of AnomlayTracker, since if the
alert is preserved, both the AnomalyTracker and metric must not have
changed, so they will both be the correct type.
Subscriptions are also redone - alerts will clear their subscriptions,
and all subscriptions will be readded.
For duration metric, we now need to propagate adding anomaly trackers to
the DurationTrackers since it's now possible to add anomaly trackers
after the durationTrackers have been created.
Test: atest statsd_test
Bug: 162323547
Change-Id: Id3afa04b252f3a3523114407a389be25b9171a97
- CarWatchdog will capture applications' stats using
KilledAppStatsReported on application killing.
Bug: 158131194
Test: Tested locally and verified the atoms are reported with
statsd_testdrive.
Change-Id: I8cf40a340350add9fadccaa887ece73227875b24