Skip to content
Commit ec288c2d authored by Songchun Fan's avatar Songchun Fan
Browse files

[pm/metrics][1/n] generating atoms for successful apk installs

+ Initial implementation of PackageMetrics.
+ Metrics collection for successful apk installs including step
  durations.

Notice that only part of the metrics is filled at the moment. Followup
CLs will fill in the missing fields.

BUG: 249294752
Test: manual steps as below
$ (on the first terminal) m statsd_testdrive
$ statsd_testdrive 524
$ (on a second terminal) adb install ~/Downloads/com.whatsapp-2205720.apk
...
Observe the result on the first terminal:

event_metrics {
  data {
    aggregated_atom_info {
      atom {
        package_installation_session_reported {
          session_id: 0
          package_name: ""
          uid: 10250
          user_ids: 0
          user_types: 1
          original_user_ids: 0
          original_user_types: 1
          public_return_code: 1
          internal_error_code: 0
          apks_size_bytes: 0
          version_code: 0
          install_steps: 1
          install_steps: 2
          install_steps: 3
          install_steps: 4
          step_duration_millis: 53
          step_duration_millis: 5
          step_duration_millis: 0
          step_duration_millis: 273
          total_duration_millis: 1486
          install_flags: 5242994
          installer_package_uid: -1
          original_installer_package_uid: -1
          data_loader_type: 0
          user_action_required_type: 0
          is_instant: false
          is_replace: true
          is_system: false
          is_inherit: false
          is_installing_existing_as_user: false
          is_move_install: false
          is_staged: false
        }
      }
      elapsed_timestamp_nanos: 3689176253653
    }
  }
}

BUG: 249294752
Test: manual
Change-Id: Ife24d75c6edd2da52be3fb0a8aea71ebf1446ca4
parent 0746231b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment