recovery_metrics_registry/
recovery_metrics_registry.rs

1// This file was generated by Cobalt's Registry parser based on the registry YAML
2// in the cobalt_config repository. Edit the YAML there to make changes.
3pub mod cobalt_registry {
4pub const CUSTOMER_NAME: &str = "fuchsia";
5pub const CUSTOMER_ID: u32 = 1;
6pub const PROJECT_NAME: &str = "recovery";
7pub const PROJECT_ID: u32 = 17;
8
9// Linear bucket constants for ota_download_duration histogram
10pub const OTA_DOWNLOAD_DURATION_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
11pub const OTA_DOWNLOAD_DURATION_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 100;
12pub const OTA_DOWNLOAD_DURATION_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 15;
13
14// Metric ID Constants
15// ota_download_duration
16pub const OTA_DOWNLOAD_DURATION_METRIC_ID: u32 = 1;
17// ota_download_status
18pub const OTA_DOWNLOAD_STATUS_METRIC_ID: u32 = 2;
19// recovery_event
20pub const RECOVERY_EVENT_METRIC_ID: u32 = 3;
21
22// Enum for ota_download_status (Metric Dimension result)
23#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
24pub enum OtaDownloadStatusMetricDimensionResult {
25  Unknown = 0,
26  Success = 1,
27  Failure = 2,
28}
29
30impl cobalt_client::traits::AsEventCode for OtaDownloadStatusMetricDimensionResult {
31  fn as_event_code(&self) -> u32 {
32    *self as u32
33  }
34}
35
36// Enum for recovery_event (Metric Dimension result)
37#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
38pub enum RecoveryEventMetricDimensionResult {
39  Unknown = 0,
40  WiFiConnected = 1,
41  OtaStarted = 2,
42  OtaSuccess = 3,
43  OtaFailed = 4,
44  StoragedReprovisioned = 5,
45}
46
47impl cobalt_client::traits::AsEventCode for RecoveryEventMetricDimensionResult {
48  fn as_event_code(&self) -> u32 {
49    *self as u32
50  }
51}
52
53}