Write stats when background dexopt job is ended.
Bug: 229966126
Test: -
1. Flash the device.
2. m statsd_testdrive
3. statsd_testdrive 467
4. adb shell cmd jobscheduler run android 801
5. Wait for it to complete.
6. See the following output:
metric_id: 1111
event_metrics {
data {
aggregated_atom_info {
atom {
background_dexopt_job_ended {
status: STATUS_JOB_FINISHED
cancellation_reason: STOP_REASON_UNDEFINED
duration_ms: 25748
duration_including_sleep_ms: 25748
}
}
elapsed_timestamp_nanos: 205806342268
}
}
}
is_active: true
7. statsd_testdrive 467
8. adb shell cmd jobscheduler run android 800
9. adb shell cmd jobscheduler timeout android 800
10. See the following output:
metric_id: 1111
event_metrics {
data {
aggregated_atom_info {
atom {
background_dexopt_job_ended {
status: STATUS_ABORT_BY_CANCELLATION
cancellation_reason: STOP_REASON_TIMEOUT
duration_ms: 5080
duration_including_sleep_ms: 5080
}
}
elapsed_timestamp_nanos: 261463072772
}
}
}
is_active: true
Change-Id: I82542de3a514e3f71a28c34a1e7da2b8d7980214
(cherry picked from commit fb20ca284c49cd74001b9e2e5598cc0b7aa31a37)
Merged-In: I82542de3a514e3f71a28c34a1e7da2b8d7980214
2 files changed